From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 665037EE80; Fri, 15 Mar 2013 13:43:47 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of oliver@first.in-berlin.de) identity=pra; client-ip=192.109.42.8; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="oliver@first.in-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of oliver@first.in-berlin.de) identity=mailfrom; client-ip=192.109.42.8; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="oliver@first.in-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@einhorn.in-berlin.de) identity=helo; client-ip=192.109.42.8; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="postmaster@einhorn.in-berlin.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AukLAPcVQ1HAbSoIe2dsb2JhbABDiDi3RYUTAwGBbBYOAQEWJgQkgioBAQQBI1YQCwkFCgICBSECAg8FGDETiA4GBK9ckm0VgQ6NFV0Hgi0yYQOOQ4gWgSCSbg X-IPAS-Result: AukLAPcVQ1HAbSoIe2dsb2JhbABDiDi3RYUTAwGBbBYOAQEWJgQkgioBAQQBI1YQCwkFCgICBSECAg8FGDETiA4GBK9ckm0VgQ6NFV0Hgi0yYQOOQ4gWgSCSbg X-IronPort-AV: E=Sophos;i="4.84,850,1355094000"; d="scan'208";a="7787483" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 15 Mar 2013 13:43:46 +0100 X-Envelope-From: oliver@first.in-berlin.de Received: from first (e178037077.adsl.alicedsl.de [85.178.37.77]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id r2FChjQC020288 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 15 Mar 2013 13:43:45 +0100 Received: by first (Postfix, from userid 1000) id 730F115400E6; Fri, 15 Mar 2013 13:43:45 +0100 (CET) Date: Fri, 15 Mar 2013 13:43:45 +0100 From: oliver To: Jeremie Dimino Cc: caml-list@inria.fr, ocsigen@inria.fr Message-ID: <20130315124345.GB3262@siouxsie> References: <5142E780.7060806@hars.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Subject: Re: [Caml-list] BUG in unix.ml (was: strange errors when linking lwt.unix) On Fri, Mar 15, 2013 at 11:38:06AM +0000, Jeremie Dimino wrote: > On Fri, Mar 15, 2013 at 9:18 AM, Florian Hars wrote: > > It probably escaped notice so far because only lwt_unix does enough strange > > things with signals in the default config to trigger it reliably. > > Indeed. BTW the only "strange" thing lwt does by default with signals > is to set a handler for SIGCHLD. > > Actually here is a way to reproduce this behavior without lwt on OSX > and some other systems: > > # #load "unix.cma";; > # Sys.set_signal Sys.sigchld (Sys.Signal_handle ignore);; > - : unit = () > # Unix.system "true";; > Exception: Unix.Unix_error (Unix.EINTR, "waitpid", ""). [...] ========================================================= oliver@siouxsie:~$ ledit ocaml Objective Caml version 3.11.2 Unknown directive `require'. # #load "unix.cma";; # Sys.set_signal Sys.sigchld (Sys.Signal_handle ignore);; - : unit = () # Unix.system "true";; - : Unix.process_status = Unix.WEXITED 0 # ========================================================= ========================================================= oliver@siouxsie:~$ source ocamlbrew/ocaml-4.00.1/etc/ocamlbrew.bashrc oliver@siouxsie:~$ ledit ocaml OCaml version 4.00.1 Unknown directive `require'. # #load "unix.cma";; # Sys.set_signal Sys.sigchld (Sys.Signal_handle ignore);; - : unit = () # Unix.system "true";; - : Unix.process_status = Unix.WEXITED 0 # ========================================================= > > This will happen in any program setting a handler for SIGCHLD. I wonder if "any program setting a handler for SIGCHLD" means "program setting a handler for SIGCHLD", or only "program setting a handler for SIGCHLD, using lwt". Ciao, Oliver