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.16 by greg, Fri Feb 28 05:18:49 2020 UTC vs.
Revision 3.17 by greg, Mon Mar 2 19:06:48 2020 UTC

# Line 32 | Line 32 | open_process(          /* open communication to separate proce
32          if (pd->pid > 0)
33                  return(-1);             /* need to close, first */
34          
35 <        if ((pd->flags & (PF_FILT_INP|PF_FILT_OUT)) == (PF_FILT_INP|PF_FILT_OUT))
35 >        if ((pd->flags&(PF_FILT_INP|PF_FILT_OUT)) == (PF_FILT_INP|PF_FILT_OUT))
36                  return(-1);             /* circular process not supported */
37  
38          pd->flags &= ~PF_RUNNING;       /* not running for sure */
# Line 112 | Line 112 | open_process(          /* open communication to separate proce
112           * No use in read stream without it, so set flag there as well.
113           * GW: This bug took me two days to figure out!!
114           */
115 <        if (pd->r >= 0)
115 >        if (pd->r > 0)
116                  fcntl(pd->r, F_SETFD, FD_CLOEXEC);
117 <        if (pd->w >= 0)
117 >        if (pd->w > 1)
118                  fcntl(pd->w, F_SETFD, FD_CLOEXEC);
119          pd->flags |= PF_RUNNING;
120          return(PIPE_BUF);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines