cm0002@infosec.pub to Programmer Humor@programming.dev · 2 months agoClosing programsinfosec.pubimagemessage-square150linkfedilinkarrow-up1768arrow-down1100
arrow-up1668arrow-down1imageClosing programsinfosec.pubcm0002@infosec.pub to Programmer Humor@programming.dev · 2 months agomessage-square150linkfedilink
minus-squareVogi@piefed.sociallinkfedilinkEnglisharrow-up55·2 months agoIsn’t that what SIGTERM is? A request to gracefully shutdown processes.
minus-square9point6@lemmy.worldlinkfedilinkarrow-up25·2 months agokill, and I swear to god if you’re still there when I ps, I’m getting out the -9
minus-square6️⃣9️⃣4️⃣2️⃣0️⃣@lemmy.worldlinkfedilinkEnglisharrow-up17·2 months agoalias murder="kill -9"
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up9·2 months agoYeah, by default kill sends sigterm, and not kill the process at all. It’s the correct behavior, sending sigkill by default would be harmful. Now take a look at how killall worked in Solaris (before it adopted GNU).
minus-squaretoynbee@lemmy.worldlinkfedilinkarrow-up3·2 months agohttps://youtube.com/watch?v=Fow7iUaKrq4
minus-square9point6@lemmy.worldlinkfedilinkarrow-up2·2 months agoOkay that took me by surprise I’ll be sharing this
minus-squarepewpew@feddit.itlinkfedilinkarrow-up13·2 months agoSystemd waits until the services terminate before shutting down
minus-square[object Object]@lemmy.worldlinkfedilinkarrow-up1·2 months agoI bet the GUI environments also have their own mechanisms to indicate that the app needs to close, before whipping out the signals.
minus-squarecannedtuna@lemmy.worldlinkfedilinkarrow-up2arrow-down1·2 months agoHow’s that differ from SIGHUP?
minus-squarepivot_root@lemmy.worldlinkfedilinkarrow-up10·2 months agoHistorical context, delivery, and handling. HUP—hang up—is sent to indicate the TTY is closed. TERM—terminate— is sent by request. What happens when received is usually up to the process. Most of them just leave the defaults, which is to exit.
minus-squareEthan@programming.devlinkfedilinkEnglisharrow-up3·2 months agoThey’re different signals. The default handling is the same - terminate - but they’re triggered by different things and (if the process handles them) handled by separate handlers.
Isn’t that what
SIGTERMis? A request to gracefully shutdown processes.kill, and I swear to god if you’re still there when Ips, I’m getting out the-9Yeah, by default
killsends sigterm, and not kill the process at all.It’s the correct behavior, sending sigkill by default would be harmful. Now take a look at how
killallworked in Solaris (before it adopted GNU).https://youtube.com/watch?v=Fow7iUaKrq4
Okay that took me by surprise
I’ll be sharing this
Please do!
Systemd waits until the services terminate before shutting down
killall -9I bet the GUI environments also have their own mechanisms to indicate that the app needs to close, before whipping out the signals.
How’s that differ from
SIGHUP?Historical context, delivery, and handling.
HUP—hang up—is sent to indicate the TTY is closed.
TERM—terminate— is sent by request.
What happens when received is usually up to the process. Most of them just leave the defaults, which is to exit.
They’re different signals. The default handling is the same - terminate - but they’re triggered by different things and (if the process handles them) handled by separate handlers.