erikcw <[EMAIL PROTECTED]> writes:

> On Sep 18, 3:33 pm, Ben Finney <[EMAIL PROTECTED]>
> wrote:
> > erikcw <[EMAIL PROTECTED]> writes:
> > > What is the correct way to launch subprocess without waiting for
> > > the result to return?
> >
> > Creating an instance of 'subprocess.Popen' will launch the process
> > and return the Popen instance. You then have the option of polling
> > it or waiting for it to complete.
> 
> So if I create a Popen object and then just ignore the object and
> exit the program the subproccess will finish it's work and then exit
> itself cleanly?

Ah, no, that's a different thing. If the parent exits, the child will
also be killed I believe.

If you want to spawn a process and have it live on independent of the
parent, you want to make the child process a "daemon", detatching
itself from the parent's environment. I don't recall how that's done
immediately, but those are the terms to search for.

-- 
 \      “Pinky, are you pondering what I'm pondering?” “Yes Brain, but |
  `\    if our knees bent the other way, how would we ride a bicycle?” |
_o__)                                           —_Pinky and The Brain_ |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to