summaryrefslogtreecommitdiff
path: root/bin/ksh/exec.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-07-15 20:35:34 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-07-15 20:35:34 +0000
commit8881f080a67f5829508cb4d4c300c5e8e87d5a0a (patch)
tree58f9d715b8f331a828509fcdb242374d28486c90 /bin/ksh/exec.c
parentd45ef3a71055dda5202210704f2c5e3ffbe12be1 (diff)
silence -Wall
Diffstat (limited to 'bin/ksh/exec.c')
-rw-r--r--bin/ksh/exec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/ksh/exec.c b/bin/ksh/exec.c
index e0f41d2c73b..68443e8c521 100644
--- a/bin/ksh/exec.c
+++ b/bin/ksh/exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec.c,v 1.20 1999/07/14 15:05:27 millert Exp $ */
+/* $OpenBSD: exec.c,v 1.21 1999/07/15 20:35:33 millert Exp $ */
/*
* execute command tree
@@ -1383,7 +1383,7 @@ iosetup(iop, tp)
return -1;
}
/* Do not save if it has already been redirected (i.e. "cat >x >y"). */
- if (e->savefd[iop->unit] == 0)
+ if (e->savefd[iop->unit] == 0) {
/* If these are the same, it means unit was previously closed */
if (u == iop->unit)
e->savefd[iop->unit] = -1;
@@ -1395,6 +1395,7 @@ iosetup(iop, tp)
* dup2 below and dup2 in restfd() failing).
*/
e->savefd[iop->unit] = savefd(iop->unit, 1);
+ }
if (do_close)
close(iop->unit);