the.bay.news

Cancel all IO operations with Ctrl+C

Ziggit
Cancel all IO operations with Ctrl+C
I’m working on a CLI program that may run for several of minutes and must gracefully exit if the user interrupts it with Ctrl+C. The issue that I’m running into is that SIGINT normally just kills the program before any cleanup can happen, and catching it with a no-op signal handler just means that all the syscalls retry after EINTR because checkCancel() has not been informed that it should stop. I assume the handler needs to inform the Io implementation of the cancelation, but I haven’t found a...

I’m working on a CLI program that may run for several of minutes and must gracefully exit if the user interrupts it with Ctrl+C. The issue that I’m running into is that SIGINT…

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.