mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Måns Rullgård" <mru@inprovide.com>
To: linux-kernel@vger.kernel.org
Subject: Re: System call v.s. errno
Date: Wed, 04 May 2005 15:30:02 +0200	[thread overview]
Message-ID: <yw1xoebr9l0l.fsf@ford.inprovide.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0505040849150.8743@chaos.analogic.com>

"Richard B. Johnson" <linux-os@analogic.com> writes:

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

The kernel knows nothing about errno.  Have you tried using strace to
check the actual return values of the system calls?

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

So go file a bug with redhat.  It wouldn't be the first time they ship
broken stuff.

-- 
Måns Rullgård
mru@inprovide.com


  reply	other threads:[~2005-05-04 13:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-04 13:22 Richard B. Johnson
2005-05-04 13:30 ` Måns Rullgård [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yw1xoebr9l0l.fsf@ford.inprovide.com \
    --to=mru@inprovide.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®