From: "Bauer, Christoph" <Christoph.Bauer@lms-gmbh.de>
To: "'Oliver Bandel'" <oliver@first.in-berlin.de>, caml-list@inria.fr
Subject: AW: [Caml-list] Unix.waitpid
Date: Thu, 30 Jun 2005 15:11:12 +0200 [thread overview]
Message-ID: <26EB47FDD566A7469FC862DAF373792F07D4E0@kaiserslautern1.lmsintl.com> (raw)
Hi,
>
>
> Well, using the corresponding C-API-function,
> you should better rename your arguments:
>
> wpid is the pid you wait for (the argument to Unix.waitpid) and
> pid is the value you get from that function:
>
>
> ===== from the wait(2)/waitpid(2)-manpage =============
> pid_t
> waitpid(pid_t wpid, int *status, int options);
> =======================================================
>
Ok.
>
> BTW: where do you set the "pid" initially?
>
>From a Unix.create_process call.
> And: if waitpid returns with a pid, then you can't wait on this
> pid/process again. So, if you wait for one pid and get a different
> pid as result of the function call, then you wait again.
> But if you another time waits for a pid, which you alread caught
> (got as a result once before), then you can wait infinite,
> because that pid was caught by waitpud before... and you have to
> wait until the pid is reused by the kernel or wait until next
> reboot. ;-)
Ok, then I'll use pid = 0 (or wpid = 0, after the renaming) to terminate
the loop.
Thanks for the replies,
Christoph Bauer
next reply other threads:[~2005-06-30 13:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-30 13:11 Bauer, Christoph [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-06-30 12:31 Bauer, Christoph
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=26EB47FDD566A7469FC862DAF373792F07D4E0@kaiserslautern1.lmsintl.com \
--to=christoph.bauer@lms-gmbh.de \
--cc=caml-list@inria.fr \
--cc=oliver@first.in-berlin.de \
/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