9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Fco.J.Ballesteros <nemo@lsub.org>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] waitpid()
Date: Fri, 16 Apr 2004 10:54:38 +0200	[thread overview]
Message-ID: <ebd6caa5f1c0c39c75e9d9e8197bb4d4@plan9.escet.urjc.es> (raw)
In-Reply-To: <f4842ac25caa131d85c944aca3e1e7c8@proxima.alt.za>

> Posix waitpid() seemingly can select the PID to wait for.  Unlike P9
> waitpid(2) which merely returns the PID.

My question is, what does posix say regarding the pids
you don't want. I mean, does it say something like

"when waitpid finds an unwanted pid it guarantees that such
information is not dropped" or the opposite, or just nothing about.
Perhaps rsc knows.

Regarding what should be done, I think that all waitpid() variants
should be dropped. The regular wait one is the one that should
be there IMHO. If you just happen to be looking for a particular
pid, then put your wait() in a lopp. If you also happen to want to
keep the unwanted ones around (should you want to wait for them
in the future), record them in a list.

The plan9 waitpid is a convenience for the case when you look for
a pid but don't care about others. Thus, I wouldn't vote for changing
the native interface; I'd just change ape, but only if posix says so.
Otherwise I'd fix the program using ape.



  reply	other threads:[~2004-04-16  8:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-16  8:04 lucio
2004-04-16  8:54 ` Fco.J.Ballesteros [this message]
2004-04-16  9:03   ` lucio
2004-04-16 11:10     ` Fco.J.Ballesteros
2004-04-16  9:07   ` lucio
2004-04-16  9:12     ` lucio
2004-04-16 11:36 ` boyd, rounin
2004-04-16 11:46   ` lucio
2004-04-16 12:01     ` boyd, rounin
2004-04-16 16:47       ` lucio
2004-04-16 17:10         ` boyd, rounin
2004-04-19  6:30           ` lucio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ebd6caa5f1c0c39c75e9d9e8197bb4d4@plan9.escet.urjc.es \
    --to=nemo@lsub.org \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).