bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SIGINT handling


From: Stephane Chazelas
Subject: Re: SIGINT handling
Date: Thu, 24 Sep 2015 20:49:06 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

2015-09-24 14:53:16 -0400, Chet Ramey:
> On 9/24/15 9:57 AM, Stephane Chazelas wrote:
> 
> > IMO, the best approach would be to give up on WCE altogether
> > which is more source of frustration anyway than it has ever
> > helped. I live very well with a /bin/sh (dash) and interactive
> > shell (zsh) that don't do it.
> 
> We'll agree to disagree.
[...]


Now that we're settled on WCE,

would you agree that

a=$(cmd-that-catches-sigint)

should behave like

(cmd-that-catches-sigint)

(as in, not exit the shell as per WCE)?

What about $PIPESTATUS?

In:

cmd-that-catches-sigint | cmd-that-does-not
or
cmd-that-does-not | cmd-that-catches-sigint

Should we exit on SIGINT or leave that command run in
background?

Should pipefail have an influence on the behaviour? What about
lastpipe?

What about when using the wait builtin?

Why should:

cmd & wait "$!"

be treated differently from

cmd

?

Because cmd's stdin is /dev/null and so is unlikely to be an
interactive command?

So we admit WCE is a kludge 

-- 
Stephane



reply via email to

[Prev in Thread] Current Thread [Next in Thread]