title: Killing processes opened with popen()?
body: <p>I'm opening a long-running process with popen().  For debugging, I'd like to terminate the process before it has completed.  Calling pclose() just blocks until the child completes.</p>
  
  <p>How can I kill the process?  I don't see any easy way to get the pid out of the resource that popen() returns so that I can send it a signal.</p>
  
  <p>I suppose I could do something kludgey and try to fudge the pid into the output using some sort of command-line hackery...</p>