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: Thu, 12 May 2005 21:14:00 -0000	[thread overview]
Message-ID: <200505122102.j4CL2tCS014283@53v30g15.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20050512191849.GA10326@nevyn.them.org> from "Daniel Jacobowitz" at May 12, 2005 03:18:49 PM

Daniel Jacobowitz wrote:

> On the one hand, this is very clever.  On the other hand, it's not very
> robust.  This is not the only signal that could arrive.  Shouldn't
> wait_lwp be looping on EINTR anyway, probably by using my_waitpid
> (which is a recent addition)?

Well, this isn't very robust either as waitpid isn't the only system
call that could be interrupted -- it just typically has the biggest
race window as it tends to sleep ...

Using SA_RESTART has the advantage that it handles *all* (well,
nearly all) system calls automatically, without having to add
EINTR loops all over the place.

If other signals are in fact a problem, too, I'd rather install
them with SA_RESTART too.  (However, I haven't ever seen the
problem with any other signal.)

Bye,
Ulrich

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


  reply	other threads:[~2005-05-12 21:05 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 [this message]
2005-05-12 21:35     ` Daniel Jacobowitz
2005-05-12 23:14       ` Andreas Schwab
2005-05-13 13:43       ` Ulrich Weigand
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=200505122102.j4CL2tCS014283@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