From: Herbert Xu <herbert@gondor.apana.org.au>
To: Johannes Altmanninger <aclopte@gmail.com>
Cc: Jilles Tjoelker <jilles@stack.nl>,
harald@gigawatt.nl, dash@vger.kernel.org
Subject: Re: [PATCH v3] Allow trap to un-ignore SIGINT/SIGQUIT in async subshells
Date: Sun, 7 Apr 2024 19:18:52 +0800 [thread overview]
Message-ID: <ZhKBHMHJRJdTdsVP@gondor.apana.org.au> (raw)
In-Reply-To: <20240329153905.154792-2-aclopte@gmail.com>
On Fri, Mar 29, 2024 at 04:39:01PM +0100, Johannes Altmanninger wrote:
>
> diff --git a/src/trap.c b/src/trap.c
> index cd84814..dbf81ea 100644
> --- a/src/trap.c
> +++ b/src/trap.c
> @@ -272,7 +272,7 @@ ignoresig(int signo)
> signal(signo, SIG_IGN);
> }
> if (!vforked)
> - sigmode[signo - 1] = S_HARD_IGN;
> + sigmode[signo - 1] = S_IGN;
This is buggy if sigmode is already S_HARD_IGN. You can fix
this by moving the if statement inside the previous one.
Please also add a comment stating that sigmode has already been
initialised by setinteractive, as otherwise we may also lose a
hard ignore.
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2024-04-07 11:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 11:01 [RFC PATCH] Allow trap to override permanently-ignored signals in background shells Johannes Altmanninger
2024-03-08 11:48 ` Harald van Dijk
2024-03-29 11:24 ` [PATCH v2] Allow trap to un-ignore SIGINT in asynchronous subshells Johannes Altmanninger
2024-03-29 13:50 ` Jilles Tjoelker
2024-03-29 15:02 ` Johannes Altmanninger
2024-03-29 15:39 ` [PATCH v3] Allow trap to un-ignore SIGINT/SIGQUIT in async subshells Johannes Altmanninger
2024-04-07 11:18 ` Herbert Xu [this message]
2024-05-18 8:38 ` [PATCH v4] " Johannes Altmanninger
2024-05-26 10:27 ` Herbert Xu
2024-05-18 8:43 ` [PATCH v3] " Johannes Altmanninger
2024-05-18 9:02 ` Herbert Xu
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=ZhKBHMHJRJdTdsVP@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=aclopte@gmail.com \
--cc=dash@vger.kernel.org \
--cc=harald@gigawatt.nl \
--cc=jilles@stack.nl \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).