]>
Commit | Line | Data |
---|---|---|
5e993f12 | 1 | Index: shell/msh.c |
2 | =================================================================== | |
3 | --- shell/msh.c (revision 15014) | |
4 | +++ shell/msh.c (working copy) | |
5 | @@ -2956,7 +2957,10 @@ forkexec(REGISTER struct op *t, int *pin | |
6 | if (pin != NULL) | |
7 | closepipe(pin); | |
8 | ||
9 | - return (pout == NULL ? setstatus(waitfor(newpid, 0)) : 0); | |
10 | + if (pout != NULL) | |
11 | + closepipe(pout); | |
12 | + | |
13 | + return (interactive ? setstatus(waitfor(newpid, 0)) : 0); | |
14 | } | |
15 | ||
16 | /* Must be the child process, pid should be 0 */ |