borgbackup / borg

Deduplicating archiver with compression and authenticated encryption.
https://www.borgbackup.org/
Other
11.24k stars 744 forks source link

Ctrl+C does not work during y/N questions #8521

Open sophie-h opened 2 weeks ago

sophie-h commented 2 weeks ago

Borg 1.4

Ctrl+C and SIGINT are not working if borg is asking a y/N question.

It would be convenient for API usage and command line usage, if aborting would work during questions as well.

ThomasWaldmann commented 2 weeks ago

Hmm, isn't Ctrl-C only checked while the program is emitting output?

sophie-h commented 2 weeks ago

Not sure what you mean with emitting output. Writing to the repo? If so, I don't see why it should be limited to that.

ThomasWaldmann commented 2 weeks ago

I mean console output. AFAIK the OS output routines check for Ctrl-C at output time and then send a signal to the user process.

ThomasWaldmann commented 2 weeks ago

Hmm, does it work if you send SIGINT twice?