Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Ulrich Weigand <uweigand@de.ibm.com>
To: drow@false.org (Daniel Jacobowitz)
Cc: uweigand@de.ibm.com (Ulrich Weigand), gdb-patches@sources.redhat.com
Subject: Re: [RFA] Fix internal error in wait_lwp (interrupted system call)
Date: Fri, 13 May 2005 13:43:00 -0000	[thread overview]
Message-ID: <200505131236.j4DCatE5014770@53v30g15.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20050512211439.GA14174@nevyn.them.org> from "Daniel Jacobowitz" at May 12, 2005 05:14:39 PM

Daniel Jacobowitz wrote:
> I think that's because GDB mostly uses signal().  That automatically
> has SA_RESTART behavior, right?

Andreas Schwab wrote:
> Depends on whether signal() has BSD or SYSV semantics.

I wasn't completely certain how to verify this at the source code level,
so I simply checked via 'strace': and indeed the signal() library calls
performed by gdb are transformed to sigaction() system calls *with*
SA_RESTART set on my Linux system.

This is IMO yet another argument for using SA_RESTART with the explicit
sigaction calls in linux-nat.c as well.

Daniel Jacobowitz wrote:
> I'm just worried that this will
> require non-local fixes; the SIGCHLD handler was in the same file, but
> arbitrary other signal handlers could be at arbitrary places in GDB.
> Not handling EINTR from a library call which is allowed to return EINTR
> is, pedantically, always a bug.
> 
> Perhaps we should make both changes.

As verifying correct EINTR handling everywhere appears to be a major
effort, and the simple SA_RESTART patch both fixes a serious problem,
and appears to be correct in any case, I'd argue for applying that
patch now, and maybe later on adding EINTR handling as required.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  Linux on zSeries Development
  Ulrich.Weigand@de.ibm.com


  parent reply	other threads:[~2005-05-13 12:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-12 19:18 Ulrich Weigand
2005-05-12 20:32 ` Daniel Jacobowitz
2005-05-12 21:14   ` Ulrich Weigand
2005-05-12 21:35     ` Daniel Jacobowitz
2005-05-12 23:14       ` Andreas Schwab
2005-05-13 13:43       ` Ulrich Weigand [this message]
2005-05-15 17:12         ` Daniel Jacobowitz
2005-05-16 11:21           ` Ulrich Weigand

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=200505131236.j4DCatE5014770@53v30g15.boeblingen.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    /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