问题
I'm using netcat -e $prog
, which is fine, but whenever $prog
exits, netcat
hangs up on the original connection. Any thoughts on how to make it disconnect with a clean FIN-ACK? Or why it's not in the first place?
$ nc localhost 2000
*random data that should just cause it to exit cleanly*
read(net): Connection reset by peer
$
来源:https://stackoverflow.com/questions/34687738/netcat-triggers-connection-reset-error-when-program-exits