title: Background process's redirected output not showing in the file
body: <p>I'm having problems with redirecting my command's output to a file, when I invoke the command as a background process.</p>
  
  <blockquote>
    <p>spawner.sh user@host ". ./.profile >> /dev/null 2>&amp;1;runjobs
    SOMEJOB" > test.log &amp;</p>
  </blockquote>
  
  <p>spawner.sh script uses #!/usr/local/bin/expect interpreter and it spawns a new process (SOMEJOB) on a remote host and interacts with it. When I remove ampersand on the end of this statement, output is being written to the test.log file. But when I run this in the background (with the ampersand), my log file is empty.</p>
  
  <p>Any ideas guys and girls?</p>