Closed
Description
Currently it uses the signal
function which translates to sigaction
with the SA_RESTART flag. Most blocking syscalls aren't interrupted by it, e.g. reading from a file descriptor will continue to wait for data after the signal. Setting a running
flag won't work unless that read returns and the process can check the running
flag.
I encountered this when I was reading inotify events. Ctrl-C didn't stop it until the next event arrived. I'm on Arch Linux x86_64 if it matters.
The change won't be backwards compatible, so perhaps add another feature to opt in?
Metadata
Metadata
Assignees
Labels
No labels