Hi,
Is there a ay to get lineRead and testModule to run at the same time. I have kind of implemented the fork method. but since it goes into an if statement lineread is executed and completed before testModule has a chance to run. In what order, or if i'm on the wrong track, what method should i use to make these modules run in a multitasking environment!!
Matt
Code:pid_t pid = fork(); if ( pid == 0 ) { lineRead(fptr2, fptr1); // stuff for child only // this normally exits the process when its done } else if ( pid != -1 ) { testModule(); // stuff in parent, if child runs } else { testModule1(); // stuff in parent, with no child }