From 599c73a35f18196e52d73522dae58399e5d779d4 Mon Sep 17 00:00:00 2001 From: "Brian S. Dean" Date: Sat, 1 Apr 2000 00:14:50 +0000 Subject: [PATCH] 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 --- usr.bin/rsh/rsh.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/rsh/rsh.c b/usr.bin/rsh/rsh.c index 95b06525cdcd..d57b5fcdbc18 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