#include //pid_t #include //fork() #include //waitpid #include //printf... #include //exit() //gp-7.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","A",NULL); waitpid(pid0, NULL, 0); if (pid1=fork() == 0) execlp("/home/mumolo/proc","proc","B",NULL); if (pid2=fork() == 0) execlp("/home/mumolo/proc","proc","C",NULL); if (pid3=fork() == 0) execlp("/home/mumolo/proc","proc","D",NULL); waitpid(pid2, NULL, 0); waitpid(pid3, NULL, 0); if (pid4=fork() == 0) execlp("/home/mumolo/proc","proc","F",NULL); waitpid(pid4, NULL, 0); waitpid(pid1, NULL, 0); if (pid5=fork() == 0) execlp("/home/mumolo/proc","proc","E",NULL); waitpid(pid5, NULL, 0); if (pid6=fork() == 0) execlp("/home/mumolo/proc","proc","G",NULL); waitpid(pid6, NULL, 0); }