caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Bauer, Christoph" <Christoph.Bauer@lms-gmbh.de>
To: caml-list@inria.fr
Subject: AW: [Caml-list] Unix.waitpid
Date: Thu, 30 Jun 2005 14:31:06 +0200	[thread overview]
Message-ID: <26EB47FDD566A7469FC862DAF373792F07D4DC@kaiserslautern1.lmsintl.com> (raw)

Sorry,

> let wait ?(delay_time = 0.01) pid idle x =
>   let rec wait' () =
>     idle x;
>     delay delay_time;
>     let pid = try fst (Unix.waitpid [Unix.WNOHANG] pid) with 
> _  -> 1 in
>       if pid <> 0 then wait' ()
>   in wait' ()
this code is wrong, my original code was:

let rec wait' () =
      idle x;
      delay delay_time;
     let wpid = try fst( Unix.waitpid [Unix.WNOHANG] pid) with _ -> pid in
       if pid <> wpid then wait' ()
    in wait' ()

Christoph Bauer


             reply	other threads:[~2005-06-30 12:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-30 12:31 Bauer, Christoph [this message]
2005-06-30 12:44 ` Oliver Bandel
2005-06-30 13:11 AW: " 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=26EB47FDD566A7469FC862DAF373792F07D4DC@kaiserslautern1.lmsintl.com \
    --to=christoph.bauer@lms-gmbh.de \
    --cc=caml-list@inria.fr \
    /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).