English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2005-11-22 (15:39)
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.