process wrapper?

Steve @ Waypath steve at waypath.com
Tue Mar 30 14:29:51 EST 2004


There should be a waiting period on posting. Yes, of course it's the other
way.

In practice, when does one use P_NOWAIT and then waitpid(), instead of
P_WAIT? I'm guessing the answer is "if you want to do something between the
spawing and the waiting," but is there a standard use I haven't learned yet?

I'm guessing your reponse will finish this thread. So, thanks again for all
the direction.

"Donn Cave" <donn at u.washington.edu> wrote in message
news:donn-08FC49.15285529032004 at nntp4.u.washington.edu...
> In article <5q6dndSDho6ZNPXd38DK-w at speakeasy.net>,
>  "Steve @ Waypath" <steve at waypath.com> wrote:
> > "Donn Cave" <donn at u.washington.edu> wrote in message
> > news:donn-959027.13550629032004 at nntp6.u.washington.edu...
>
> > > spawnv returns a process ID, if you use os.P_NOWAIT.  It returns
> > > the process exit status if you use os.P_WAIT.  If you look at the
> > > code, in os.py, you will see that this second variation is essentially
> > > implemented by applying waitpid() to the first.
> >
> > So, if I'm following this correctly, if I use os.P_NOWAIT, I shouldn't
have
> > to apply waitpid(), no? And, then, I shouldn't have a zombie process if
I
> > use P_NOWAIT, either. Am I getting this?
>
> Well, no, I believe you have it backwards.
>
>    Donn Cave, donn at drizzle.com





More information about the Python-list mailing list