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.7 by greg, Thu Jan 20 04:08:00 2005 UTC vs.
Revision 3.9 by greg, Sat Dec 12 23:08:13 2009 UTC

# Line 74 | Line 74 | close_process(         /* close pipes and wait for process */
74   SUBPROC *pd
75   )
76   {
77 <        int     pid, status;
77 >        int     status;
78  
79          if (!pd->running)
80                  return(0);
81        close(pd->r);
81          close(pd->w);
82          pd->running = 0;
83 <        if (waitpid(pd->pid, &status, 0) == pd->pid)
83 >        if (waitpid(pd->pid, &status, 0) == pd->pid) {
84 >                close(pd->r);
85                  return(status>>8 & 0xff);
86 +        }
87          return(-1);             /* ? unknown status */
88   }
89  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines