Hi Phillip, On Fri, 4 Mar 2022, Phillip Wood wrote: > From: Phillip Wood <phillip.wood@xxxxxxxxxxxxx> > > If the user suspends git while it is waiting for a keypress reset the > terminal before stopping and restore the settings when git resumes. If > the user tries to resume in the background print an error > message (taking care to use async safe functions) before stopping > again. Ideally we would reprint the prompt for the user when git > resumes but this patch just restarts the read(). > > The signal handler is established with sigaction() rather than using > sigchain_push() as this allows us to control the signal mask when the > handler is invoked and ensure SA_RESTART is used to restart the > read() when resuming. This description makes sense. From my understanding of signals, the code also does make sense, but it is unfortunate that it has to be so much code to implement something as straight-forward as suspend/resume. FWIW I tested the `add -p` command with these patches on Windows and it still works as well as when I had developed it. Thank you, Dscho