title: TCL wait for exec background job to finish
body: <p>How do I get notification that a job that I launched in TCL via exec has finished?</p>
  
  <pre><code>set pid [ exec job &amp; ]
  while {&lt;some_magic&gt;} {puts "" waiting for $pid to finish ; sleep 1}
  puts "Job $pid has finished. Now let's collect results."
  </code></pre>
  
  <p>The whole idea is that in reality I want to launch many jobs and then need to monitor when they're done.</p>
  
  <p>Your feedback is much appreciated.</p>
  
  <p>Best,
  Gert</p>