ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/persist.c
(Generate patch)

Comparing ray/src/rt/persist.c (file contents):
Revision 2.17 by greg, Fri Jul 19 10:16:00 1996 UTC vs.
Revision 2.21 by gregl, Tue Oct 28 14:00:02 1997 UTC

# Line 12 | Line 12 | static char SCCSid[] = "$SunId$ LBL";
12  
13   #ifdef F_SETLKW
14   #include "paths.h"
15 + #include "selcall.h"
16   #include <signal.h>
16 #include <sys/types.h>
17   #include <sys/stat.h>
18                                        /* select call compatibility stuff */
19 #ifndef FD_SETSIZE
20 #include <sys/param.h>
21 #define FD_SETSIZE      NOFILE          /* maximum # select file descriptors */
22 #endif
23 #ifndef FD_SET
24 #ifndef NFDBITS
25 #define NFDBITS         (8*sizeof(int)) /* number of bits per fd_mask */
26 #endif
27 #define FD_SET(n, p)    ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
28 #define FD_CLR(n, p)    ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
29 #define FD_ISSET(n, p)  ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
30 #define FD_ZERO(p)      bzero((char *)(p), sizeof(*(p)))
31 #endif
18  
19   #ifndef TIMELIM
20   #define TIMELIM         (8*3600)        /* time limit for holding pattern */
# Line 138 | Line 124 | pfhold()               /* holding pattern for idle rendering proces
124          sprintf(buf, "%s %d\n%s\n%s\n%s\n", progname, getpid(),
125                          inpname, outpname, errname);
126          n = strlen(buf);
141        lseek(persistfd, 0L, 0);
127          if (write(persistfd, buf, n) < n)
128                  error(SYSTEM, "error writing persist file");
129 +        lseek(persistfd, 0L, 0);
130                                  /* wait TIMELIM for someone to signal us */
131          got_io = 0;
132          signal(SIGIO, sig_io);
# Line 265 | Line 251 | io_process()           /* just act as go-between for actual pro
251                                  goto readerr;
252                          if (nr == 0) {
253                                  close(fderr);
254 <                                close(2);
254 >                                /* close(2);    don't close stderr! */
255                                  fderr = -1;
256                          } else
257                                  do {            /* write it all */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines