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
[Caml-list] Unix module and threads
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel Andor <da209@c...>
Subject: Re: [Caml-list] Unix module and threads
On Sunday 05 September 2004 2:42 pm, Markus Mottl wrote:
> On Sun, 05 Sep 2004, Janne Hellsten wrote:
> > I wonder what happens if I call [Unix.chdir foo] from two different
> > threads, with two different directories?
> This is not thread-safe: threads share the current working directory of
> the process.
> > After chdir I typicall call [Unix.system] and/or
> > [Unix.open_process_full] and expect the directory to be the one just
> > previously set with [Unix.chdir].

If you absolutely must use chdir, perhaps you could use a mutex (a `path' 
mutex, if you like) to control modification of the process working directory?


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: