--- ray/src/rt/persist.c 1996/07/19 10:16:00 2.17 +++ ray/src/rt/persist.c 1997/10/16 13:49:22 2.20 @@ -14,6 +14,9 @@ static char SCCSid[] = "$SunId$ LBL"; #include "paths.h" #include #include +#ifdef INCL_SEL_H +#include +#endif #include /* select call compatibility stuff */ #ifndef FD_SETSIZE @@ -138,9 +141,9 @@ pfhold() /* holding pattern for idle rendering proces sprintf(buf, "%s %d\n%s\n%s\n%s\n", progname, getpid(), inpname, outpname, errname); n = strlen(buf); - lseek(persistfd, 0L, 0); if (write(persistfd, buf, n) < n) error(SYSTEM, "error writing persist file"); + lseek(persistfd, 0L, 0); /* wait TIMELIM for someone to signal us */ got_io = 0; signal(SIGIO, sig_io); @@ -265,7 +268,7 @@ io_process() /* just act as go-between for actual pro goto readerr; if (nr == 0) { close(fderr); - close(2); + /* close(2); don't close stderr! */ fderr = -1; } else do { /* write it all */