subprocess call is not waiting.

Benjamin Kaplan benjamin.kaplan at case.edu
Wed Sep 19 13:10:11 EDT 2012


On Sep 19, 2012 9:37 AM, "andrea crotti" <andrea.crotti.0 at gmail.com> wrote:
> Well there is a process which has to do two things, monitor
> periodically some external conditions (filesystem / db), and launch a
> process that can take very long time.
>
> So I can't put a wait anywhere, or I'll stop everything else.  But at
> the same time I need to know when the process is finished, which I
> could do but without a wait might get hacky.
>
> So I'm quite sure I just need to run the subprocess in a subthread
> unless I'm missing something obvious.

If you want to see if a processes has terminated without waiting, use poll.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120919/5a263de0/attachment.html>


More information about the Python-list mailing list