From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 3D7F0BBAF for ; Thu, 18 Dec 2008 15:51:48 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.36,243,1228086000"; d="scan'208";a="18643890" Received: from estephe.inria.fr (HELO [128.93.11.95]) ([128.93.11.95]) by mail2-relais-roc.national.inria.fr with ESMTP; 18 Dec 2008 15:51:48 +0100 Message-ID: <494A6384.1070406@inria.fr> Date: Thu, 18 Dec 2008 15:51:48 +0100 From: Xavier Leroy User-Agent: Thunderbird 1.5.0.7 (X11/20060915) MIME-Version: 1.0 To: Anastasia Gornostaeva Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] fork() and threads in ocaml 3.11 References: <20081217182834.GB36722@ermine.home> In-Reply-To: <20081217182834.GB36722@ermine.home> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocaml:01 uname:01 endline:01 macos:01 bug:01 macos:01 ocaml:01 cvs:01 cvs:01 threads:01 threads:01 unix:01 caml-list:01 hangs:01 let:03 > The program > > open Unix > > let os = (let f = open_process_in "uname -sr" in > let answer = input_line f in > ignore (close_process_in f); answer) > > let _ = > let f () = > print_endline os > in > let t = Thread.create f () in > Thread.join t > > hangs on my FreeBSD 7.0. This could be the same problem reported under MacOS X as PR#4666 in the bug tracker. Apparently, MacOS X doesn't allow a process having multiple threads to perform an exec*() system call. Maybe FreeBSD has the same limitation. > I tried ocaml from yesterday's CVS, but it does not help. The "release 3.11" branch of the CVS contains a tentative fix for PR#4666. It isn't yet propagated to the CVS trunk. You can get this branch using "cvs co -r release311". Hope this helps, - Xavier Leroy