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.34 by schorsch, Tue Mar 30 16:13:01 2004 UTC vs.
Revision 2.39 by schorsch, Mon Apr 21 07:31:30 2008 UTC

# Line 12 | Line 12 | static const char      RCSid[] = "$Id$";
12   #include <string.h>
13   #include <signal.h>
14   #include <sys/stat.h>
15 + #include <sys/types.h>
16 + #ifndef NON_POSIX /* XXX need abstraction for process management */
17 + #include <sys/wait.h>
18 + #endif
19  
20   #include "platform.h"
21   #include "rtprocess.h" /* getpid() */
# Line 121 | Line 125 | pfhold(void)           /* holding pattern for idle rendering pr
125          char    buf[512];
126          register int    n;
127                                  /* close input and output descriptors */
128 <        close(fileno(stdin));
129 <        close(fileno(stdout));
128 >        close(0);
129 >        close(1);
130          if (errfile == NULL)
131 <                close(fileno(stderr));
131 >                close(2);
132                                  /* create named pipes for input and output */
133          if (mkfifo(mktemp(strcpy(inpname,TEMPLATE)), 0600) < 0)
134                  goto createrr;
# Line 335 | Line 339 | io_process(void)               /* just act as go-between for actual
339                                  } while ((nr -= n) > 0);
340                  }
341          }
342 <        wait(0);                /* wait for feeder process */ /* XXX platform */
342 >        kill(pid, SIGTERM);     /* no more process to feed, so... */
343 >        waitpid(pid, 0, 0);     /* wait for feeder process */
344          _exit(status);
345   formerr:
346          error(USER, "format error in persist file");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines