netcat (nc) lacks the -q option (present for example on debian's version of it). This option makes netcat exit when stdin (or whatever input you're using) sends an EOF. This options renders file transfer using nc more or less impossible, since you always have to watch whether the file is already transfered or not... nc won't stop on it's own Reproducible: Always Steps to Reproduce: 1. nc -l -p 31337 > /dev/null 2. dd if=/dev/urandom bs=1024 count=1 | nc localhost 31337 3. Actual Results: nothing, nc hangs Expected Results: nc exists after sending 1024 bytes to nirvana
ok, i added all the debian patches to cvs ... that gives us broadcast (-b) and your eof thang (-q) ... i had to tweak a few to make them work with the ipv6 patch we have ... either way, we've got it now ... also might be nice to note that i hope you dont plan on using your nc script anywhere but Gentoo and debian since they're the only ones that have -q support really :)