public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* System call v.s. errno
@ 2005-05-04 13:22 Richard B. Johnson
  2005-05-04 13:30 ` Måns Rullgård
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Richard B. Johnson @ 2005-05-04 13:22 UTC (permalink / raw)
  To: Linux kernel

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.

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().

This problem does not exist with Linux-2.4.x. It started to show
up when user's updated their machines to newer RH stuff that uses
linux-2.6.5-1.358.


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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-05-05  0:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-04 13:22 System call v.s. errno Richard B. Johnson
2005-05-04 13:30 ` Måns Rullgård
2005-05-04 13:41 ` Wichert Akkerman
2005-05-04 13:42 ` Jakub Jelinek
2005-05-04 13:49   ` Richard B. Johnson
2005-05-04 16:03     ` Stephen Hemminger
2005-05-04 13:55 ` Martin Waitz
2005-05-04 14:22 ` Arjan van de Ven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox