From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 9104DBCAE for ; Thu, 30 Jun 2005 14:31:18 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j5UCVIms031446 for ; Thu, 30 Jun 2005 14:31:18 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA16858 for ; Thu, 30 Jun 2005 14:31:17 +0200 (MET DST) Received: from kaiserslautern1.lmsintl.com (Kaiserslautern1.lms-gmbh.de [213.68.136.230]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j5UCVGvr018127 for ; Thu, 30 Jun 2005 14:31:17 +0200 Received: by kaiserslautern1.lmsintl.com with Internet Mail Service (5.5.2653.19) id ; Thu, 30 Jun 2005 14:31:15 +0200 Message-ID: <26EB47FDD566A7469FC862DAF373792F07D4DC@kaiserslautern1.lmsintl.com> From: "Bauer, Christoph" To: caml-list@inria.fr Subject: AW: [Caml-list] Unix.waitpid Date: Thu, 30 Jun 2005 14:31:06 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Miltered: at concorde with ID 42C3E616.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 42C3E614.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 waitpid:01 rec:01 waitpid:01 rec:01 unix:01 unix:01 let:03 let:03 christoph:04 christoph:04 fst:06 fst:06 wrong:08 bauer:09 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.2 X-Spam-Level: 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