#include <stdio.h> #include <stdlib.h> #include <sys/ipc.h> #include <sys/shm.h> #include #include <sys/wait.h> void main() { int child,id,n,i; char*shmptr; int td; printf("\n enter the no of items "); scanf("%d",&n); child=fork(); if(!child){ id=shmget(2000,32,0666|IPC_CREAT); shmptr=shmat(id,0,0); printf("\n child is adding to item to buffer"); for(i=0;i
shmptr=shmat(id,0,0); printf("\n parent is now consuming :\n"); for(i=0;i
Related Documents
More Documents from "utkarsh yadav"