title: os.kill not working on spawned process
body: <p>I have written my own Python-based job scheduler which uses the multiprocessing module, to spawn new jobs.  I'm trying to implement a feature to kill a running process using <code>os.kill</code>, but it is not working.  My (simplified) code look like the following:</p>
  
  <pre><code>from multiprocessing import Process
  import os
  ...
  p = Process(target=self.start_job, args=(run_dir,cmd,))
  p.start()
  ...
  def start_job(self,run_dir,cmd):
          os.chdir(run_dir)
          os.system(cmd)
          print os.getpid()
          ...
  </code></pre>
  
  <p>I want to take this pid that is output (e.g. 3064) and from another python session run:</p>
  
  <pre><code>import os, signal    
  os.kill(3064, signal.SIGTERM)
  </code></pre>
  
  <p><code>os.kill</code> works if I run it on the pid of the parent/spawning process, but it does not work if I execute it on the pid of the child/spawned process.  In addition to SIGTERM, I've also tried a number of other signals such as SIGKILL, SIGQUIT, etc. None of them worked either.  Any help would be greatly appreciated. </p>