bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

eof in nc (netcat)


From: Daniel Feenberg
Subject: eof in nc (netcat)
Date: Mon, 8 Oct 2007 18:35:12 -0400 (EDT)


I don't know if this is the right mailing list (nc isn't mentioned in any of the lists) and I don't know if it is a real bug or not, but the GNU version 0.7.1 of nc (the Gnu version of netcat) seems to differ from some other versions of netcat in its treatment of EOF on the standard input.

For example on our SunOS 5.9 system:

cat /dev/null | nc mail 25

prints the sendmail banner, but then hangs. On our Linux Fedora 7 system a non-Gnu version of nc prints the banner and then exits cleanly. This would seem to be preferable if feasible.

Of course, we don't really care about sendmail and nc, but I thought this would be an easily reproduced demonstration of something that gets to be a problem for our actual server. The same effect is visible with other small servers, viz echo and discard:

cat /dev/null | nc localhost 7
cat /dev/null | nc localhost 9

which return immediately on Linux, but hang on Gnu nc. BTW, both of those servers (echo and discard) seem to work fine untill they get to the end of file.

Daniel Feenberg
NBER
1050 Mass Ave
Cambridge MA 02138
617-588-0343





reply via email to

[Prev in Thread] Current Thread [Next in Thread]