1

Child Process wait parent then it execute and then visa-versa in C linux

view story
linux-howto

http://stackoverflow.com – I'm creating a parent-child process in C and these processes are using an array of characters as a shared memory and i want the execution to be in this sequence parent->child->parent->child->parent->child .... and so on, i am using Wait(NULL) in parent but the execution go in the sequence of parent->child->parent->parent->parent .... can anyone help me please ??? i am trying to do this without semaphores or any ting else am still a novice Linux programmer int main(void) { if (fork( ) == 0) { //child if( (id = shmget(key, sizeof(char[n]), 0)) == -1 ) { exit (HowTos)