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

Comparing ray/src/common/unix_process.c (file contents):
Revision 3.11 by greg, Fri Mar 4 02:48:14 2016 UTC vs.
Revision 3.12 by greg, Fri Mar 4 19:16:49 2016 UTC

# Line 28 | Line 28 | char   *av[]
28          char    *compath;
29          int     p0[2], p1[2];
30  
31 <        pd->pid = 0;
31 >        pd->pid = -1;
32          pd->running = 0;                /* not going yet */
33          
34          if (av == NULL)                 /* cloning operation? */
# Line 92 | Line 92 | int nproc
92          if (nproc == 1) {                       /* await specific process? */
93                  if (waitpid(pd->pid, &status, 0) != pd->pid)
94                          return(-1);
95 <                pd->pid = 0;
95 >                pd->pid = -1;
96                  return(status>>8 & 0xff);
97          }
98                                                  /* else unordered wait */
99          while (togo > 0 && (pid = wait(&status)) >= 0) {
100                  for (i = nproc; i-- > 0; )
101                          if (pd[i].pid == pid) {
102 <                                pd[i].pid = 0;
102 >                                pd[i].pid = -1;
103                                  --togo;
104                                  break;
105                          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines