From: Phillip Wood Date: Mon, 11 Sep 2023 10:14:31 GMT Subject: Re: [PATCH] rebase -i: ignore signals when forking subprocesses Message-ID: In-Reply-To: <80eb7631-e5c0-497e-b2a9-b1f8c8a4a306@gmail.com> On 11/09/2023 11:00, Phillip Wood wrote: > There is an inevitable race between wait() returning and calling > signal() to restore the handlers for SIGINT and SIGQUIT, In principle if we installed a signal handler to set a flag if a signal is received while calling wait() and then once wait() returns successfully see if the child was killed we can tell if the signal was received while the child was alive. In practice if the child is catching SIGINT or SIGQUIT we cannot rely on it re-raising the signal so that wont work. Best Wishes Phillip