Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Threads & Fork
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Florian Weimer <fw@d...>
Subject: Re: [Caml-list] Threads & Fork
* Jonathan Bryant:

> I'm confused as to why the attached code hangs.  My understanding of
> Unix.fork () is that it completely clones the current process, which in
> my understanding, clones the processes's threads as well.  Apparently,
> though, that is not the case, because I can't join the thread in both
> the parent and the child.

I can't speak for the OCaml run-time, but POSIX fork only duplicates
the current thread, so the new process is essentially single-threaded.