29 lines
947 B
C
29 lines
947 B
C
|
///******************************************************************/
|
||
|
///* IUT NICE-COTE D'AZUR - Departement INFORMATIQUE - R. CHIGNOLI */
|
||
|
///* Module M311 Theme IPC POSIX */
|
||
|
///******************************************************************/
|
||
|
///* shm_add.c : voir enonce */
|
||
|
///* UTILISATION : commande nom_segment */
|
||
|
///* Utiliser ls -l /dev/shm et rm /dev/shm/... */
|
||
|
///******************************************************************/
|
||
|
#include <fcntl.h>
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
#include <unistd.h>
|
||
|
#include <sys/mman.h>
|
||
|
|
||
|
int main (int argc, char * argv[]) {
|
||
|
int fd;
|
||
|
int * compteur;
|
||
|
|
||
|
if (argc != 2) {
|
||
|
fprintf(stderr, "Syntaxe : %s nom_segment\n", argv[0]);
|
||
|
exit(EXIT_FAILURE);
|
||
|
}
|
||
|
///
|
||
|
/// A TERMINER ...
|
||
|
///
|
||
|
return EXIT_SUCCESS;
|
||
|
}
|