title: Run local command from expect script
body: <p>I am trying to kill a local background process at a certain point in an <code>expect</code> script.
  Consider the sample script:</p>
  
  <pre><code>#! /usr/bin/expect
  set killPID [lindex $argv 0];
  set timeout 1
  spawn ftp ftp.ftp.com
  expect "Name"
  send "Username\r"
  expect "Password:"
  send "xxxxxx\r"
  expect "ftp&gt;"
  send_user "Killing local process id: $killPID\n"
  interact
  </code></pre>
  
  <p>I run this script with the id of a local process that I want to kill as first argument.
  How can I kill the process just before the <code>interact</code> command?</p>