Version française
Home     About     Download     Resources     Contact us    
Browse thread
fork() and threads in ocaml 3.11
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: [Caml-list] fork() and threads in ocaml 3.11
> 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