From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 8A712BB9C for ; Sat, 10 Dec 2005 01:15:56 +0100 (CET) Received: from orsfmr003.jf.intel.com (fmr18.intel.com [134.134.136.17]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jBA0FtIE028929 for ; Sat, 10 Dec 2005 01:15:56 +0100 Received: from orsfmr100.jf.intel.com (orsfmr100.jf.intel.com [10.7.209.16]) by orsfmr003.jf.intel.com (8.12.10/8.12.10/d: major-outer.mc,v 1.1 2004/09/17 17:50:56 root Exp $) with ESMTP id jBA0Fh9f028546; Sat, 10 Dec 2005 00:15:43 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by orsfmr100.jf.intel.com (8.12.10/8.12.10/d: major-inner.mc,v 1.2 2004/09/17 18:05:01 root Exp $) with SMTP id jBA0ENnb005100; Sat, 10 Dec 2005 00:15:43 GMT Received: from orsmsx332.amr.corp.intel.com ([192.168.65.60]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.7.47) with SMTP id M2005120916154309615 ; Fri, 09 Dec 2005 16:15:43 -0800 Received: from orsmsx409.amr.corp.intel.com ([192.168.65.58]) by orsmsx332.amr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.211); Fri, 9 Dec 2005 16:15:43 -0800 X-MIMEOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: RE: [Caml-list] Unix.system returns "no child processes" Date: Fri, 9 Dec 2005 16:15:41 -0800 Message-ID: <196F1D996F92CD46A542EA519DB8CE4702AD0289@orsmsx409> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [Caml-list] Unix.system returns "no child processes" Thread-Index: AcX8+DuS3rarFAAZR6+BNHJq78otSwAJgHxQ From: "Harrison, John R" To: "Christopher Conway" Cc: , "Harrison, John R" X-OriginalArrivalTime: 10 Dec 2005 00:15:43.0052 (UTC) FILETIME=[DBED10C0:01C5FD1E] X-Scanned-By: MIMEDefang 2.52 on 10.7.209.16 X-Miltered: at nez-perce with ID 439A1E3B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 johnh:01 ocaml:01 ocaml:01 waitpid:01 terminating:01 waitpid:01 getpid:01 banner:98 banner:98 unix:01 unix:01 invoke:01 exception:01 exception:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Hi Chris, | I am using Unix.system to invoke external commands from within Ocaml. On=20 | the old machines (with the 32-bit version of Ocaml), I would=20 | occasionally get the exception Unix_error(ECHILD,"waitpid","") from=20 | Unix.system. With the new machines, I'm seeing this at every call to=20 | Unix.system, every time. I have investigate the behavior of the=20 | sub-processes, and they are terminating normally, with no indication of=20 | any error. I also sometimes see the intermittent error: Exception: Unix.Unix_error (Unix.ECHILD, "waitpid", ""). But what I'm doing with the system call is sufficiently sleazy that I probably deserve it. I'm running OCaml under the checkpointing program "ckpt". The following function is supposed to make the session checkpoint itself, then print a startup banner when execution is resumed: let self_destruct bannerstring =3D let complete_banner =3D if bannerstring =3D "" then startup_banner else startup_banner^"\n "^bannerstring in Gc.compact(); let pid =3D string_of_int(Unix.getpid()) in (ignore(Unix.system("kill -USR1 "^pid)); Format.print_string complete_banner; Format.print_newline(); Format.print_newline());; Sometimes I get the exception above instead of the banner when the process restarts. The likelihood of that happening seems highly machine-dependent, and even on a given machine there's no obvious pattern. John.