From: "boyd, rounin" <boyd@insultant.net>
To: <9fans@cse.psu.edu>
Subject: Re: [9fans] waitpid()
Date: Fri, 16 Apr 2004 13:36:38 +0200 [thread overview]
Message-ID: <036c01c423a7$21a3f3c0$57d87d50@SOMA> (raw)
In-Reply-To: <f4842ac25caa131d85c944aca3e1e7c8@proxima.alt.za>
> So the big question is whether it is entirely out of the question to
> enhance the kernel "wait" functionality so that something resembling
> Posix waitpid() can return the termination information for a chosen
> PID.
don't do it in kernel mode. do it in user mode. just record the
pid + Waitmsg of the ones that wait has returned and search
this first and if not found go into a wait loop, recording the
pid + Waitmsg as wait returns if it's not the one you want,
otherwise return.
The Waitmsg structure is allocated by malloc(2) and
should be freed after use. For programs that only need
the pid of the exiting program, waitpid returns just the
pid and discards the rest of the information.
http://plan9.bell-labs.com/magic/man2html/2/wait
next prev parent reply other threads:[~2004-04-16 11:36 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
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 [this message]
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='036c01c423a7$21a3f3c0$57d87d50@SOMA' \
--to=boyd@insultant.net \
--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).