# | Line 78 | Line 78 | SUBPROC *pd | |
---|---|---|
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 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |