summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/serverloop.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2000-03-28 20:22:49 +0000
committermarkus <markus@openbsd.org>2000-03-28 20:22:49 +0000
commit279a333b4fb6fe7f0f89dc9cc7570cb1c5776a3e (patch)
tree1c4b60f772259eebf2b39fd7c9665b8182814161 /usr.bin/ssh/serverloop.c
parentsync (diff)
downloadwireguard-openbsd-279a333b4fb6fe7f0f89dc9cc7570cb1c5776a3e.tar.xz
wireguard-openbsd-279a333b4fb6fe7f0f89dc9cc7570cb1c5776a3e.zip
close(fdin) if fdin != fdout, shutdown otherwise, ok theo@
Diffstat (limited to 'usr.bin/ssh/serverloop.c')
-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. */