On Fri, 4 May 2001, Dan Sugalski wrote:

> That problem is the same as if you called getpwnam() from multiple places 
> in your program without making sure that you're properly set up or cleaned 
> up.

What I was trying to say -- and I realise I didn't say it very well -- was
that even previously valid data can get screwed.  Ie, even if I check the
return value from getpwnam(), the pointer can get nullified by another
thread after the test.  Sorry that my first message wasn't clear.

> It is *not* a universal panacea, but it is a perfectly fine one for a 
> subset of the non-threadsafe calls.

Defining the elements of the subset is problematic.

Cheers,
-Ben

-- 
signer: can't create ~/.sig: Directory not empty

Reply via email to