From 85b3ca05f10b2eadc75b8dc8376fc893c490d60f Mon Sep 17 00:00:00 2001 From: aaron <> Date: Fri, 13 Dec 2002 19:53:45 +0000 Subject: Recent modifications to netcat changed the behaviour to only exit when both the read (network) and write (stdin) ends of the socket were both closed. This is not how nc traditionally works. Instead, revert back to finishing up when read() on the socket returns 0; deraadt@, vincent@ ok. --- src/usr.bin/nc/netcat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/usr.bin/nc/netcat.c b/src/usr.bin/nc/netcat.c index 23d0ed4468..717e0377eb 100644 --- a/src/usr.bin/nc/netcat.c +++ b/src/usr.bin/nc/netcat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.53 2002/11/13 22:26:15 markus Exp $ */ +/* $OpenBSD: netcat.c,v 1.54 2002/12/13 19:53:45 aaron Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -546,7 +546,7 @@ readwrite(int nfd) pfd[1].fd = wfd; pfd[1].events = POLLIN; - while (pfd[0].fd != -1 || pfd[1].fd != -1) { + while (pfd[0].fd != -1) { if (iflag) sleep(iflag); -- cgit v1.2.3-55-g6feb