* fork() and threads in ocaml 3.11
@ 2008-12-17 18:28 Anastasia Gornostaeva
2008-12-18 14:51 ` [Caml-list] " Xavier Leroy
0 siblings, 1 reply; 3+ messages in thread
From: Anastasia Gornostaeva @ 2008-12-17 18:28 UTC (permalink / raw)
To: caml-list
Hello.
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.
I tried ocaml from yesterday's CVS, but it does not help.
How to be?
ermine
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] fork() and threads in ocaml 3.11
2008-12-17 18:28 fork() and threads in ocaml 3.11 Anastasia Gornostaeva
@ 2008-12-18 14:51 ` Xavier Leroy
2008-12-18 19:25 ` Anastasia Gornostaeva
0 siblings, 1 reply; 3+ messages in thread
From: Xavier Leroy @ 2008-12-18 14:51 UTC (permalink / raw)
To: Anastasia Gornostaeva; +Cc: caml-list
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Caml-list] fork() and threads in ocaml 3.11
2008-12-18 14:51 ` [Caml-list] " Xavier Leroy
@ 2008-12-18 19:25 ` Anastasia Gornostaeva
0 siblings, 0 replies; 3+ messages in thread
From: Anastasia Gornostaeva @ 2008-12-18 19:25 UTC (permalink / raw)
To: caml-list
On Thu, Dec 18, 2008 at 03:51:48PM +0100, Xavier Leroy wrote:
[...]
> > 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,
Oh, with this CVS it works perfectly. Thanks!
ermine
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-18 19:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-17 18:28 fork() and threads in ocaml 3.11 Anastasia Gornostaeva
2008-12-18 14:51 ` [Caml-list] " Xavier Leroy
2008-12-18 19:25 ` Anastasia Gornostaeva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox