You are on page 1of 1

#include<stdio.

h>
#include<sys/ipc.h>
#include<sys/shm.h>
#include<stdlib.h>
main(){

int shmid;
key_t key=5678;
struct shmid_ds* buf;
if((shmid=shmget(key,27,IPC_CREAT|0766))!=-1){
shmctl(shmid,IPC_RMID,buf);
}
else{
printf("Error in creating shared memory\n");
exit(1);
}

You might also like