4 ms·
Very informative article. What I love is how they come up with different names for different signals that kill/suspend processes: `SIGHUP`, `SIGINT`, `SIGQUIT
by pooriaazimi 14y ago
Very informative article.
What I love is how they come up with different names for different signals that kill/suspend processes:
`SIGHUP`, `SIGINT`, `SIGQUIT`, `SIGABRT`, `SIGKILL`, `SIGTERM` and `SIGSTOP`!
7 different combinations of SIG and a verb that means "terminate/kill/stop/close/quit/suspend", and it's not that confusing (once you get your head around it). Must have been quite a challenge!
- emmelaich 14y agoAlthough sigkill should've been named sigstop and sigstop should've been sigpause. Ah, hindsight is a wonderful thing.
- jlgreco 14y agoEh, do you stop your car at an intersection, or do you pause it?
- snogglethorpe 14y agoThe names are not entirely arbitrary, though, and the nuances are actually meaningful, and based on real-world behavior. E.g., "HUP" means hangup, and indeed, that's what you get when your modem hangs up accidentally! When handled by an application, it often is treated appropriately (e.g., the handler might trigger an autosave before quitting). "INT" means "interrupt", and usage follows that sense -- it more likely than others to be ignored/repurposed (e.g. to quit back to some application prompt rather than killing the application entirely). "ABRT" means "abort", and is typically used as a last-ditch means of killing the program when an internal error is detected. "KILL" is more draconian than any other; there is no recovery possible. etc.