Re: System call v.s. errno

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2005-05-04 at 09:22 -0400, Richard B. Johnson wrote:
> Does anybody know for sure if global 'errno' is supposed to

errno is a glibc level thing really, and in recent glibc tehre is no
global errno anymore, only a per thread errno.

> The answer is not obvious because the 'C' runtime library
> doesn't really give access to 'errno' instead it is dereferenced
> off some pointer returned from a function called __errno_location().

yeah to make sure you get the per thread errno instead. Any reasonable
sane code (and all standards conforming code) just deals with that fine.
The case that is known to break is if your app has it's own

extern int errno;

in it, instead of using the proper header to get it.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux