summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorbsd <bsd@FreeBSD.org>2000-04-01 00:14:50 +0000
committerbsd <bsd@FreeBSD.org>2000-04-01 00:14:50 +0000
commit66b7eaeb75e1664bb1de7c364a673b357bcdf5f4 (patch)
tree51013266572b7ddd49dc8bdb0b4edb1f051abc3f /usr.bin
parent2b63c0a8d449f69ff7db5e320580b9e318236533 (diff)
downloadFreeBSD-src-66b7eaeb75e1664bb1de7c364a673b357bcdf5f4.zip
FreeBSD-src-66b7eaeb75e1664bb1de7c364a673b357bcdf5f4.tar.gz
Fix a bug in rsh that caused the remote process to hang waiting on
input even if the '-n' flag to rsh is used. The write side of the socket should be closed to allow the remote process to see EOF. Submitted by: Brad Chisholm <sasblc@unx.sas.com>
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/rsh/rsh.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/rsh/rsh.c b/usr.bin/rsh/rsh.c
index 95b0652..d57b5fc 100644
--- a/usr.bin/rsh/rsh.c
+++ b/usr.bin/rsh/rsh.c
@@ -315,6 +315,8 @@ try_connect:
if (pid < 0)
err(1, "fork");
}
+ else
+ (void)shutdown(rem, 1);
#ifdef KERBEROS
#ifdef CRYPT
OpenPOWER on IntegriCloud