Closed czechboy0 closed 7 years ago
I just used something like this to catch interrupts in my command line app.
signal(SIGINT) { sig in
terminal.killTasks()
exit(2)
}
Were you able to debug such process with lldb though? I think when you add a new breakpoint while there's a running socket call, it'll fail.
I haven't seen this in a really long time, I think the issue is resolved
Currently when you e.g. set a breakpoint in Xcode while the code is blocking on
select
(or any other blocking socket call), it'll fail with error interrupted. We should check for this error and retry, or even better look into using theSA_RESTART
flag so that the system calls are resumed, instead of aborted, when a signal arrives./cc @tannernelson