diff options
author | bsd <bsd@FreeBSD.org> | 2000-04-01 00:14:50 +0000 |
---|---|---|
committer | bsd <bsd@FreeBSD.org> | 2000-04-01 00:14:50 +0000 |
commit | 66b7eaeb75e1664bb1de7c364a673b357bcdf5f4 (patch) | |
tree | 51013266572b7ddd49dc8bdb0b4edb1f051abc3f | |
parent | 2b63c0a8d449f69ff7db5e320580b9e318236533 (diff) | |
download | FreeBSD-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>
-rw-r--r-- | usr.bin/rsh/rsh.c | 2 |
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 |