--- ray/src/px/pcompos.c 1992/08/13 10:49:04 2.12 +++ ray/src/px/pcompos.c 1992/08/28 16:29:20 2.13 @@ -375,21 +375,16 @@ int code; #else -#include - quit(code) /* exit gracefully */ int code; { - int status; - - if (code) { /* abnormal exit -- kill children */ - signal(SIGPIPE, SIG_IGN); - kill(0, SIGPIPE); - } + register int i; + /* close input files */ + for (i = 0; i < nfile; i++) + fclose(input[i].fp); /* reap any children */ - while (wait(&status) != -1) - if (code == 0) - code = status>>8 & 0xff; + while (wait(0) != -1) + ; exit(code); }