summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2000-03-28 20:22:50 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2000-03-28 20:22:50 +0000
commit5991eb23450ef8a217d36a460d4fafcd913891d3 (patch)
tree5f0a33b1e757bf95283d6790290822e3c29fda35
parentf5e7745a2b3e3c799e33e04af33021c80f13aa80 (diff)
close(fdin) if fdin != fdout, shutdown otherwise, ok theo@
-rw-r--r--usr.bin/ssh/serverloop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/serverloop.c b/usr.bin/ssh/serverloop.c
index a5ecfe97d5d..d787894b0a9 100644
--- a/usr.bin/ssh/serverloop.c
+++ b/usr.bin/ssh/serverloop.c
@@ -369,7 +369,7 @@ process_output(fd_set * writeset)
#ifdef USE_PIPES
close(fdin);
#else
- if (fdout == -1)
+ if (fdin != fdout)
close(fdin);
else
shutdown(fdin, SHUT_WR); /* We will no longer send. */
@@ -495,7 +495,7 @@ server_loop(int pid, int fdin_arg, int fdout_arg, int fderr_arg)
#ifdef USE_PIPES
close(fdin);
#else
- if (fdout == -1)
+ if (fdin != fdout)
close(fdin);
else
shutdown(fdin, SHUT_WR); /* We will no longer send. */