Re: [PATCH] rebase -i: ignore signals when forking subprocesses

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

 



On 11/09/2023 11:32, Oswald Buddenhagen wrote:
On Mon, Sep 11, 2023 at 11:14:31AM +0100, Phillip Wood wrote:
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.

yes, this is what i was already writing:

I'm afraid that was not clear to me from your message.

my point is that you shouldn't be doing that in the first place.
install the handlers when the sequencer is entered and leave them there.
the handlers need to set (volatile) flag variables, which are checked by
the sequencer on a regular basis.

I did consider doing that before I submitted this patch but it is a much more invasive and substantial change. The patch here makes it safe for the user to interrupt a subprocess started by the sequencer. If I understand correctly your suggestion implies that the user could interrupt the sequencer at any point and we'd need to exit and ensure that they could safely continue the rebase afterwards. That is not the case at the moment and I'm concerned making that promise could turn into a maintenance burden in the future.

Best Wishes

Phillip



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux