summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-05-10 01:24:11 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-05-10 01:24:11 +0200
commit9bb703e2cf87d220caf709ecde7935b239ab7cc8 (patch)
tree2f940842c852ffb83237f26f9de79f83c09f7383
parent03cf6cae57040e7cbb4627858789bf93b0b686bc (diff)
srv: be nice, close the previously duped pipe filedescriptor
-rw-r--r--sys/src/cmd/srv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/src/cmd/srv.c b/sys/src/cmd/srv.c
index f4186f56c..9dd328e35 100644
--- a/sys/src/cmd/srv.c
+++ b/sys/src/cmd/srv.c
@@ -51,6 +51,7 @@ connectcmd(char *cmd)
rfork(RFNOTEG);
dup(p[0], 0);
dup(p[0], 1);
+ close(p[0]);
close(p[1]);
execl("/bin/rc", "rc", "-c", cmd, nil);
fprint(2, "exec failed: %r\n");