On Wed, 4 May 2005, Jakub Jelinek wrote:
On Wed, May 04, 2005 at 09:22:09AM -0400, Richard B. Johnson wrote:
Does anybody know for sure if global 'errno' is supposed to
be altered after a successful system call? I'm trying to
track down a problem where system calls return with EINTR
even though all signal handlers are set with SA_RESTART in
the flags. It appears as though there may be a race somewhere
because if I directly set errno to 0x1234, within a few
hundred system calls, it gets set to EINTR even though all
system calls seemed to return 'good'. This makes it
hard to trace down the real problem.
http://www.opengroup.org/onlinepubs/009695399/functions/errno.html
is very clear on this. Unless indicated that errno is valid after a call
(for many syscalls it is valid when the syscall returns -1), errno has
unspecified value.
Jakub
-
Okay, thanks. That means that it's okay for it to get trashed
NotGood(tm) for debugging.
Cheers,
Dick Johnson
Penguin : Linux version 2.6.11 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by Dictator Bush.
98.36% of all statistics are fiction.
-
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]