Hi,

Paul Stoeber wrote:
> Should a userland program be allowed to depend on errno==0 on entry
> to main()?  (At least one in the tree does.)
>
> I see no place in the C library that explicitly ensures this, and
> it might be false if the user runs the program under LD_PRELOAD
> tricks.
>   
I think the .bss is guaranteed to be zero filled upon startup. At least 
in OpenBSD.
But, of course, any library can screw up errno, if preloaded with 
$LD_PRELOAD
or just linked in.

-- Pawel.

[demime 1.01d removed an attachment of type application/gzip which had a name 
of errno_test.tar.gz]

Reply via email to