| 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 */ |
| 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); |