title: Parallel processing in Expect
body: <p>The code below works well right now; however, it's serially executed. I'd like to be able to roll through the source_list file until I get a max number of sessions and let them all complete and feed the results back to this parent script. Is that possible or would it require me to change the script I'm calling to feed back the results? I've looked at the fork command but it somewhat eludes me.</p>
  
  <pre><code>set source_list [lindex $argv 0]
  
  set device_list [open $source_list r]
  while {[gets $device_list ipaddress] != -1} {
  spawn "./ios-upgrade.exp" 0 $ipaddress username password image-file MD5hash ftp-server
  expect eof
  }
  close $device_list
  </code></pre>