3 ms·
It seems wrong that the app would be responsible for cleanup... Shouldn't this be solved in the shell / terminal ? What if kill -9?
by silon42 1y ago
It seems wrong that the app would be responsible for cleanup... Shouldn't this be solved in the shell / terminal ? What if kill -9?
- pjerem 1y agoWhen you use ctrl+c, you are not killing the program, you are sending it a SIGTERM signal which essentially means « could you please stop yourself ? » so the program have a chance to clean things before exiting. kill -9 is sending a SIGKILL signal which, well, kills the program immediately.
- Vogtinator 1y agoctrl-c sends SIGINT.
- pjerem 1y agoYou are right ! Thank you !
- sfoley 1y agoSIGINT, not SIGTERM.
- pjerem 1y agoYou are right ! Thank you !