9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Bruce Ellis" <bruce.ellis@gmail.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu>
Subject: Re: [9fans] waitfor() call question?
Date: Fri, 13 Oct 2006 18:43:13 +1000	[thread overview]
Message-ID: <775b8d190610130143q6772b9fdm5ab28ca9f5a3c071@mail.gmail.com> (raw)
In-Reply-To: <ee9e417a0610122000r1cf90015wc7775089fafc42bb@mail.gmail.com>

the culprit, not the scene of the crime.

brucee

On 10/13/06, Russ Cox <rsc@swtch.com> wrote:
> > Nemo's book (http://lsub.org/who/nemo/9.intro.pdf, page 91) gives code
> > for waiting for a particular descendant process if that's what's
> > wanted.  Actually, he uses it for the immediate child process, which
> > makes me wonder—after the child process has exited, can the parent
> > wait() for a grandchild?
>
> Nope.
>
> > Why is waitfor() "occasionally unavoidable" on UNIX?
>
> Because sometimes what would be multiple processes on Plan 9
> is a single process on Unix, depending on the implementation of
> the thread library, and two shared-memory procs each waiting for
> their own children need not to get the other's child.
> You could have some shared list of accidentally-waited-for children
> but then the coordination to wake up the guy who is actually
> waiting gets cumbersome.
>
> Russ
>


      reply	other threads:[~2006-10-13  8:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-12 21:34 ISHWAR RATTAN
2006-10-12 21:50 ` Russ Cox
2006-10-13  1:27   ` Joel “chesky” Salomon
2006-10-13  3:00     ` Russ Cox
2006-10-13  8:43       ` Bruce Ellis [this message]

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=775b8d190610130143q6772b9fdm5ab28ca9f5a3c071@mail.gmail.com \
    --to=bruce.ellis@gmail.com \
    --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).