dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anders Kaseorg <andersk@MIT.EDU>
To: dash@vger.kernel.org
Cc: Jonathan Nieder <jrnieder@gmail.com>, git@packages.debian.org
Subject: [PATCH] Set SA_RESTART flag on SIGCHLD handler
Date: Thu, 21 Jun 2012 03:48:41 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.2.00.1206210345050.3236@dr-wily.mit.edu> (raw)
In-Reply-To: <20120319033751.GA25237@burratino>

It looks like this was never forwarded to the dash mailing list.  Any 
thoughts from upstream?

Context: http://thread.gmane.org/gmane.comp.version-control.git.debian/147
(FTR, it did happen again.)

Anders

On Sun, 18 Mar 2012, Jonathan Nieder wrote:

> Anders Kaseorg wrote:
> 
> > So I guess I’m willing to just hope for now that this doesn’t happen
> > again.  (Unless you think it’s a dash bug that EINTR isn’t handled
> > there?)
> 
> Yes, I suspect it's a dash >= 0.5.6 bug.  On initialization dash sets
> up a signal handler for SIGCHLD without the SA_RESTART flag, which can
> cause other dash code to fail at seemingly random times.  Similar
> problems would arise when scripts set up traps.
> 
> diff --git i/src/trap.c w/src/trap.c
> index 17316c95..cd99596f 100644
> --- i/src/trap.c
> +++ w/src/trap.c
> @@ -259,7 +259,7 @@ setsignal(int signo)
>  		act.sa_handler = SIG_DFL;
>  	}
>  	*t = action;
> -	act.sa_flags = 0;
> +	act.sa_flags = SA_RESTART;
>  	sigfillset(&act.sa_mask);
>  	sigaction(signo, &act, 0);
>  }
> 

       reply	other threads:[~2012-06-21  7:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4F665E77.3060102@mit.edu>
     [not found] ` <20120319025201.GA24778@burratino>
     [not found]   ` <4F66A6CA.4010002@mit.edu>
     [not found]     ` <20120319033751.GA25237@burratino>
2012-06-21  7:48       ` Anders Kaseorg [this message]
     [not found]         ` <20120622003628.GD4730@burratino>
2012-06-22  9:36           ` [PATCH] Set SA_RESTART flag on SIGCHLD handler Anders Kaseorg
2012-06-26 10:03             ` Anders Kaseorg
2012-06-26 12:19               ` Anders Kaseorg
2012-07-21 23:14                 ` Anders Kaseorg
2012-06-22 22:02           ` Jilles Tjoelker

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=alpine.DEB.2.00.1206210345050.3236@dr-wily.mit.edu \
    --to=andersk@mit.edu \
    --cc=dash@vger.kernel.org \
    --cc=git@packages.debian.org \
    --cc=jrnieder@gmail.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;
as well as URLs for NNTP newsgroup(s).