commit | 95fa0ea3d421772f29f78e3484ad824ffd5e8b6f | [log] [tgz] |
---|---|---|
author | Matt Kraai <kraai@debian.org> | Thu Dec 14 04:34:58 2000 +0000 |
committer | Matt Kraai <kraai@debian.org> | Thu Dec 14 04:34:58 2000 +0000 |
tree | e016bb8c29e0ab2a0c544cbd87cf97c8213922fd | |
parent | 6f6aa9b428f8d9c1988b837a3e473c5248358384 [diff] [blame] |
Shutdown sending on the socket when stdin closes.
diff --git a/nc.c b/nc.c index 805bbd4..84c1a81 100644 --- a/nc.c +++ b/nc.c
@@ -111,6 +111,8 @@ exit(0); ofd = fileno(stdout); } else { + if (nread == 0) + shutdown(sfd, 1); ofd = sfd; }