Email List: Xaustin-group-futures-lX
[All Lists]

Re: thread-private working directory

To: s lurndal <yyyyyyyy@xxxxxxxxxxxx>
Subject: Re: thread-private working directory
From: Marcus Brinkmann <yyyyyyyyyyyyyyyy@xxxxxxxxxxxxxxxxxx>
Date: Mon, 4 Aug 2003 22:07:08 +0200
Cc: Jason Zions <yyyyyyyy@xxxxxxxxxxxxxxxxxxx>, Kaz Kylheku <yyy@xxxxxxxxxxxxxxxxxxx>, Alexander Terekhov <yyyyyyyy@xxxxxxxxxx>, yyyyyyyyyyyyyyyyyyyyyy@xxxxxxxxxxxxx, yyyyyyyyyyyyyy@xxxxxxxxxxxxx
References: <200308041844.LAA21736@slurndal-lnx.verisign.com>
On Mon, Aug 04, 2003 at 11:44:12AM -0700, s lurndal wrote:
> > 
> > Or, you could simply write your threaded applications to always pass
> > fully rooted paths. Seems like a much simpler change to me. 
> 
> The performance of such an application will, of course, be significantly
> worse than one which used per-thread or per-context current working 
> directories due to the need to traverse the full pathname on each 
> pathname-based operation, even with aggressive DNLC caching by the 
> operating system.

It might not even be possible, for example if the current working directory
is not accessible from the root directory:

  mkdir ("bar");
  chdir ("bar");
  rmdir ("../bar");

With fchdir you can actually switch between such inaccessible directories.

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    yyyyyy@xxxxxxx
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/
yyyyyyyyyyyyyyyy@xxxxxxxxxxxxxxxxxx
http://www.marcus-brinkmann.de/

<Prev in Thread] Current Thread [Next in Thread>