> To my knowledge there are at least three netcats. Version 1.10 from [EMAIL PROTECTED] is all the idnetifying info I can find.
> Well, you might be using netcat for something I've not. The listener end > of netcat will shut down when the client end closes the port, this is a > given ... however, the client end does not by default close the port > when it's stdin reaches EOF ... Right, then my client is ***ed. > What do you mean, netcat always uses two connections? There's stdin and > stdout, for sure, but only one network connection ... Correct, I meant 2 streams - one in each direction. Only one tcp connection. > B's netcat doesn't quit, even though I've sent EOF. A's netcat doesn't > quit, either. /tmp/reply has been populated though, and I can see its > contents from another session ... Good example, that's how I'm using it. A's should quit when B has read the data and has closed its sending stream, i.e. A's receiving stream. A's sending stream has EOF as soon as the echo finishes, that makes EOF in both directions for A. When A terminates, B terminates too. That's would I would be expecting. Obivously your B isn't terminating, dunno why. > I think I'll need to see an example of your usage that you're having > difficult with ... :-) A$ netcat -l -p 111 <somefile & B$ netcat A 111 </dev/null >somefile & B's netcat immediately closes because of EOF on its stdin, taking A's down with it I think I've found the problem. Looking at SuSE's added .diff, there's an additional + shutdown(fd, 1); /* no more sending from us */ which SuSE 8.2 doesn't have. 8.2's netcat runs as I expect on 9.1. Off to SuSE's buggy thingy I go... Thanks for your thoughts, I wasn't sure whether this behaviour wasn't intentional afterall or caused by something outside of netcat. Volker -- Volker Kuhlmann is possibly list0570 with the domain in header http://volker.dnsalias.net/ Please do not CC list postings to me.
