[BusyBox-cvs] svn commit: trunk/busybox/networking
pgf at busybox.net
pgf at busybox.net
Mon Jul 18 22:23:16 UTC 2005
Author: pgf
Date: 2005-07-18 16:23:16 -0600 (Mon, 18 Jul 2005)
New Revision: 10853
Log:
fix for "0000027: patch: nc will spin if stdin closed"
Modified:
trunk/busybox/networking/nc.c
Changeset:
Modified: trunk/busybox/networking/nc.c
===================================================================
--- trunk/busybox/networking/nc.c 2005-07-18 22:20:12 UTC (rev 10852)
+++ trunk/busybox/networking/nc.c 2005-07-18 22:23:16 UTC (rev 10853)
@@ -175,8 +175,11 @@
exit(0);
ofd = STDOUT_FILENO;
} else {
- if (nread == 0)
- shutdown(sfd, 1);
+ if (nread <= 0) {
+ shutdown(sfd, 1 /* send */ );
+ close(STDIN_FILENO);
+ FD_CLR(STDIN_FILENO, &readfds);
+ }
ofd = sfd;
}
More information about the busybox-cvs
mailing list