title: Netcat Triggers Connection Reset Error When Program Exits
body: <p>I'm using <code>netcat -e $prog</code>, which is fine, but whenever <code>$prog</code> exits, <code>netcat</code> 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?</p>
  
  <pre><code>$ nc localhost 2000
  
  *random data that should just cause it to exit cleanly*
  
  read(net): Connection reset by peer
  
  $
  </code></pre>