1 int main(int argc, char *argv[])
5 case 'q': /* Message Queue */
6 debug("Message Queue Try\n");
8 id = msgget(IPC_PRIVATE, IPC_CREAT|0666);
9 printf("Identifier Value %d \n", id);
10 msgctl(id, IPC_RMID, NULL);
13 case 's': /* Semaphore */
16 id = semget(IPC_PRIVATE, 1, IPC_CREAT|0666);
17 printf("Identifier Value %d \n", id);
18 semctl(id, 0, IPC_RMID);
21 case 'm': /* Shared Memory */
22 debug("Shared Memory\n");
24 id = shmget(IPC_PRIVATE, 1000, IPC_CREAT|0666);
25 printf("Identifier Value %d \n", id);
26 shmctl(id, IPC_RMID, NULL);
29 default: /* should not reached */