title: How to get process ID of background process?
body: <p>I start a background process from my shell script, and I would like to kill this process when my script finishes.</p>
  
  <p>How to get the PID of this process from my shell script? As far as I can see variable <code>$!</code> contains the PID of the current script, not the background process.</p>