apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jus...@erenkrantz.com>
Subject RE: [PATCH] Be verbose during shl_load on HP-UX
Date Thu, 05 Jun 2003 01:38:16 GMT
--On Wednesday, June 4, 2003 9:01 PM -0400 "MATHIHALLI,MADHUSUDAN 
(HP-Cupertino,ex1)" <madhum@hp.com> wrote:

> If I understand you correctly, libraries should return the errno (because
> errors may mean strings also), and not try writing anything to stderr. The
> application should do the job of writing to stderr.
>
> Is that just your opinion OR is it accepted programming practice OR is it
> documented somewhere ?..

Accepted convention for good libraries, and one that we have decided to 
follow.  What *is* permissible is to return the error string from the function 
without printing it - this lets the application decide what to do with the 
string.  But, printing directly to stderr from a library isn't good practice 
nor one we will encourage.

> The reason I ask this is because I know of atleast one library (pthread)
> that writes stuff to stderr (ofcourse, only under some circumstances)

Who said pthread was a good library?  =-)  -- justin

Mime
View raw message