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 056447EE80 for ; Fri, 15 Mar 2013 12:38:09 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of jdimino@janestreet.com) identity=pra; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="jdimino@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of jdimino@janestreet.com designates 38.105.200.229 as permitted sender) identity=mailfrom; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="jdimino@janestreet.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@tot-dmz-mxout1.janestreet.com) identity=helo; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="postmaster@tot-dmz-mxout1.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au8AAG0HQ1EmacjlmWdsb2JhbABDh269IoFjHg4BAQEBAQgLCwcUKIIqAQEFQAEBNwEPCwsNLiISAQUBHBmIFAOjaYpyhDsBBY8XBo1vgSYHFoMqll2BH4ReiSMWKYQt X-IPAS-Result: Au8AAG0HQ1EmacjlmWdsb2JhbABDh269IoFjHg4BAQEBAQgLCwcUKIIqAQEFQAEBNwEPCwsNLiISAQUBHBmIFAOjaYpyhDsBBY8XBo1vgSYHFoMqll2BH4ReiSMWKYQt X-IronPort-AV: E=Sophos;i="4.84,850,1355094000"; d="scan'208";a="7776461" Received: from mx5.janestreet.com (HELO tot-dmz-mxout1.janestreet.com) ([38.105.200.229]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 15 Mar 2013 12:38:08 +0100 Received: from [172.27.22.15] (helo=tot-smtp) by tot-dmz-mxout1.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1UGSxb-00077i-2Y for caml-list@inria.fr; Fri, 15 Mar 2013 07:38:07 -0400 Received: from tot-dmz-mxgoog1.delacy.com ([172.27.224.14] helo=mxgoog2.janestreet.com) by tot-smtp with esmtps (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1UGSxb-0004ES-1o for caml-list@inria.fr; Fri, 15 Mar 2013 07:38:07 -0400 Received: from mail-ie0-f197.google.com ([209.85.223.197]) by mxgoog2.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1UGSxa-0005gj-VP for caml-list@inria.fr; Fri, 15 Mar 2013 07:38:07 -0400 Received: by mail-ie0-f197.google.com with SMTP id k14so16804897iea.4 for ; Fri, 15 Mar 2013 04:38:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=x-received:mime-version:x-received:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=tV5cQX9G7n9tg3AzJz8PgXMKG8NdqAQVgfG7nd7sovg=; b=MiuQKKhI3XmBOUfk0iIIktOSdKc5/UQhp0IWiq0bDKCSEKcRgu0Nni+3oA681zFi6N D7V+wSyMR7RWVAdxdxaaGdfMnkMC99zdD9v+XDIPePY33m1/Fbb8ag4pC95OYcj6DHca 19fU4DLG6iUwpxzcX9ijw/ZAlta4vR0Hz/uOo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-received:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=tV5cQX9G7n9tg3AzJz8PgXMKG8NdqAQVgfG7nd7sovg=; b=fDTSJ53cM113QwgKoS6M1REW1sy/WvMY3HfJBlwcqGjVAf/LW+iiUf6lOUavlBzm/4 szFLRYJXTdHKg4kIapQX1+M/S7uHl3OAG8F5siuC+aX8TtQPVlzzbChrjSSjzhGe1omR eLCJvd5HSqyI+srcs6M6fDnzrY8mlo60ceSr3G21vEFe4376Q3Won4f8BzXInxDpjOTx uO5BhadHu1HXAWyMN/rF9VkEst/sOHvcsqK4H5SxZ822ZbccQ1ciiJtE6lMZ0rAcOme7 RgQiUzzjw6MfLmJT1aqCTqTLWQ050QqXBAuxzeOZDXl5mll+2DqecOZP1e1QHEQ4jXJy ch2Q== X-Received: by 10.50.47.170 with SMTP id e10mr986771ign.84.1363347486639; Fri, 15 Mar 2013 04:38:06 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.47.170 with SMTP id e10mr986767ign.84.1363347486555; Fri, 15 Mar 2013 04:38:06 -0700 (PDT) Received: by 10.50.29.48 with HTTP; Fri, 15 Mar 2013 04:38:06 -0700 (PDT) In-Reply-To: <5142E780.7060806@hars.de> References: <5142E780.7060806@hars.de> Date: Fri, 15 Mar 2013 11:38:06 +0000 Message-ID: From: Jeremie Dimino To: caml-list@inria.fr Cc: ocsigen@inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQngCEM9CnBSqF3yiZhoU7kfH8vRTpVViBSMMzSsklCnPUUJDAyV31TlQ6SFRXfMzNZ8Kl/T/xf0YaFnvit4Iojj5B3bChaG/qGDD/6mfQfG3AFFtdrII4nYEuA/d4oD+tHJ2VK7WXBz2aZmp7zY0H+I6eFs8A== Subject: Re: [Caml-list] BUG in unix.ml (was: strange errors when linking lwt.unix) 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", ""). This will happen in any program setting a handler for SIGCHLD. To avoid this you can: - if you are using lwt, use Lwt_unix.system - block SIGCHLD in the current thread while calling Unix.system - write your own system function Maybe this should be the default behavior. Can you open a ticket on mantis about this? Cheers, Jeremie