#include //pid_t #include //fork() #include //waitpid #include //printf... #include //exit() //gp-6.c int main(int argc, char *argv[]){ pid_t cpid, w, pid0, pid1,pid2,pid3,pid4,pid5,pid6,pid7; if (pid0=fork() == 0) execlp("/home/mumolo/proc","proc","T0",NULL); if (pid1=fork() == 0) execlp("/home/mumolo/proc","proc","T1",NULL); waitpid(pid0, NULL, 0); waitpid(pid1, NULL, 0); if (pid2=fork() == 0) execlp("/home/mumolo/proc","proc","T2",NULL); waitpid(pid2, NULL, 0); if (pid3=fork() == 0) execlp("/home/mumolo/proc","proc","T3",NULL); if (pid4=fork() == 0) execlp("/home/mumolo/proc","proc","T4",NULL); waitpid(pid3, NULL, 0); waitpid(pid4, NULL, 0); }