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.38 by schorsch, Wed Jun 7 17:52:04 2006 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 + #include <sys/wait.h>
17  
18   #include "platform.h"
19   #include "rtprocess.h" /* getpid() */
# Line 121 | Line 123 | pfhold(void)           /* holding pattern for idle rendering pr
123          char    buf[512];
124          register int    n;
125                                  /* close input and output descriptors */
126 <        close(fileno(stdin));
127 <        close(fileno(stdout));
126 >        close(0);
127 >        close(1);
128          if (errfile == NULL)
129 <                close(fileno(stderr));
129 >                close(2);
130                                  /* create named pipes for input and output */
131          if (mkfifo(mktemp(strcpy(inpname,TEMPLATE)), 0600) < 0)
132                  goto createrr;
# Line 335 | Line 337 | io_process(void)               /* just act as go-between for actual
337                                  } while ((nr -= n) > 0);
338                  }
339          }
340 <        wait(0);                /* wait for feeder process */ /* XXX platform */
340 >        kill(pid, SIGTERM);     /* no more process to feed, so... */
341 >        waitpid(pid, 0, 0);     /* wait for feeder process */
342          _exit(status);
343   formerr:
344          error(USER, "format error in persist file");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines