system,pipes did not pass EOF to sub process

This commit is contained in:
Gerhard Rieger 2008-11-01 18:58:31 +01:00
parent 363fa568ac
commit 38f6677892

View file

@ -1157,6 +1157,9 @@ int _xioopen_foxec_end(int xioflags, /* XIO_RDONLY etc. */
a graceful solution via temporary descriptors */ a graceful solution via temporary descriptors */
int tmpi, tmpo; int tmpi, tmpo;
Close(rdpip[0]);
Close(wrpip[1]);
if (fdi == rdpip[1]) { /* a conflict here */ if (fdi == rdpip[1]) { /* a conflict here */
if ((tmpi = Dup(wrpip[0])) < 0) { if ((tmpi = Dup(wrpip[0])) < 0) {
Error2("dup(%d): %s", wrpip[0], strerror(errno)); Error2("dup(%d): %s", wrpip[0], strerror(errno));