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 DB7167EE80; Fri, 15 Mar 2013 15:05:07 +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: AsEIAIUpQ1HAbSoIiWdsb2JhbABDiDi3RoUbAwGBbBYOAQEBFRIUBCSCKgEBBSNWEAsJBQoCAgUhAgIPBRgxiCcEsBaSchWBDo0VXQeCLYETA45EiBaBIJJu X-IPAS-Result: AsEIAIUpQ1HAbSoIiWdsb2JhbABDiDi3RoUbAwGBbBYOAQEBFRIUBCSCKgEBBSNWEAsJBQoCAgUhAgIPBRgxiCcEsBaSchWBDo0VXQeCLYETA45EiBaBIJJu X-IronPort-AV: E=Sophos;i="4.84,850,1355094000"; d="scan'208";a="7804264" 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 15:05:07 +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 r2FE56N1007695 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 15 Mar 2013 15:05:06 +0100 Received: by first (Postfix, from userid 1000) id 4A0B915400E6; Fri, 15 Mar 2013 15:05:05 +0100 (CET) Date: Fri, 15 Mar 2013 15:05:06 +0100 From: oliver To: Jeremie Dimino Cc: caml-list@inria.fr, ocsigen@inria.fr Message-ID: <20130315140506.GI3409@siouxsie> References: <5142E780.7060806@hars.de> <20130315124345.GB3262@siouxsie> <20130315135823.GH3409@siouxsie> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20130315135823.GH3409@siouxsie> 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 02:58:23PM +0100, oliver wrote: > Hi, > > On Fri, Mar 15, 2013 at 01:24:10PM +0000, Jeremie Dimino wrote: > > BTW, here is an example that will work on all unix systems: > > > > # #load "unix.cma";; > > # Sys.set_signal Sys.sigchld (Sys.Signal_handle ignore);; > > - : unit = () > > # let ic = Unix.open_process_in "sleep 5";; > > val ic : in_channel = > > # Unix.system "sleep 10";; > > Exception: Unix.Unix_error (Unix.EINTR, "waitpid", ""). > [...] > > > If you want to use Unix-module, you should use it consequently, > not switching to Sys-module, when you want to handle signals. > > > Try this one: > > open Unix;; > let new_mask = sigprocmask SIG_BLOCK [10] in > let ic = Unix.open_process_in "sleep 5" in > Unix.system "sleep 10";; Hahah... works even with empty list :-) Ciao, Oliver