Subject: Re: fork(2) vs. pthread_create() (fwd)
To:, Emmanuel Dreyfus <>
From: Nathan J. Williams <>
List: tech-userlevel
Date: 06/11/2004 12:51:47
Bill Studenmund <> writes:

>> We are able to output error messages...
> From a library? No. You can't.

Emmanuel is pointing out that we do, in fact, print messages to stderr
in the various mutex error-detecting conditions that normally
abort. They can be configured to just print the message and not abort,
or to do neither.

Perhaps we "shouldn't", but it's wrong to say that we "can't".

> The fact that libraries sometimes output to stderr is actually a security 
> issue. Consider a daemon that has hooked something other than stderr to fd 
> 2. If you can trigger the program to call a routine that outputs an error 
> (and/or you can trigger the conditions of the error), you can get 
> arbitrary data send down whatever's hooked to fd2.

Does this mean you think that libraries should never use assert(3)?

        - Nathan