#include //pid_t #include //fork() #include //waitpid #include //printf... #include //exit() //gp-2.c void main(){ int pid1,pid2,pid3; if (pid1=fork() == 0) execlp("/home/mumolo/proc","proc","T1",NULL); if (pid3=fork() == 0) execlp("/home/mumolo/proc","proc","T3",NULL); waitpid(pid1, NULL, 0); if( pid2=fork() == 0) execlp("/home/mumolo/proc","proc","T2",NULL); waitpid(pid3, NULL, 0); waitpid(pid2, NULL, 0); }