get the en of a program running in background

awalter1 awalter1 at cegetel.net
Mon Sep 11 12:31:04 EDT 2006


Hi,
I am using subprocess module, then I do not fork my program.
How use os.wait() in a non blocking mode ?
Thanks

Damjan wrote:
> > It works when a click on a button launches a program P.
> > Now, I want that a click on another button launches another program P'
> >
> > In this case there is only one signal for two events : the end of P and
> > the end of P'.
> > How can distinct the two cases.
>
> Remember the PIDs of the forked procesess and in your signal handler use
> os.wait() to see which one has died.
> BTW os.wait() can work in non-blocking mode .
> 
> 
> -- 
> damjan




More information about the Python-list mailing list