]>
diplodocus.org Git - nmh/blob - docs/historical/mh-nov-1983/subs/showfile.c
8 int pid
, wpid
, intr
, status
;
11 intr
= (int) signal(SIGINT
, SIG_IGN
);
14 if((pid
= fork()) == 0) {
18 signal(SIGINT
, (int (*)()) intr
);
20 perror("Can't exec showproc");
22 } else if(pid
== -1) {
23 fprintf(stderr
, "No forks!\n");
26 while((wpid
= wait(&status
)) != -1 && wpid
!= pid
) ;
27 signal(SIGINT
, (int (*)()) intr
);