Hacker News new | ask | show | jobs
by LoganDark 433 days ago
> Not to mention that it will halt on signal, contrary to the goal.

Well, it's difficult not to halt on, say, SIGKILL, that's for sure. There are ways to do it, but they are cursed and I hate them (e.g. zombie processes). Though you can still usually get rid of zombie processes by killing the parent, or just rebooting the system.

1 comments

Halting normally implies that the program has finished executing. Maybe, as your tricks suggest, SIGKILL is a little grey area, but I think it is fair to say that its intent is ultimately to kill the program even if it hasn't finished executing, thus in a typical scenario it wouldn't see the program halt. Rebooting or otherwise terminating execution of a program at the hardware level before a program has finished is even clearer that the program hasn't halted, at least as the term is typically understood.

But something like SIGINT is at the discretion of the program. If it chooses to accept the signal and halt it is entirely because the program decided it was finished.