On Thu, 14 Sep 2006 07:35:08 -0400 James Carlson wrote: > Joerg Schilling writes: > > Also, nftw() is not reentrant as it depends on static data that is > > overwritten > > in case you run two instances from two threads at the same time.
> At least on Open Solaris[1], nftw() is safe in multithreaded > applications as long as you don't use FTW_CHDIR[2]. It doesn't use > static data, and instead passes around pointers to 'struct Var' and > 'struct Save' that are allocated on the stack. > See ftw(3C) and $SRC/lib/libc/port/gen/nftw.c for details. so the coding of diff -R would require 3 threads -- one for nftw on directory A, one for nftw on directory B, and one to handle the nftw callbacks from the other two is that right? > [1] We're still talking about Open Solaris, right? ;-} yes and no yes -- open solaris for the particular details of porting non-solaris software to solaris no -- non-solaris open source software must deal with more than solaris so any changes to non-solaris software must (should) make sense in the universe > 1 system -- Glenn Fowler -- AT&T Research, Florham Park NJ --