Sample Header Ad - 728x90

How to kill - softly?

7 votes
1 answer
12349 views
If I want to kill a process as careful and politely as possible, which signals should I use in a kill command, in which order? I would like to give the programm any kind of time to clean up, if it likes to, so just sending a SIGTERM will be to harsh, I think? I'll use SIGKILL ("-9") last, that's clear. But which to start? SIGHUP? Which signals are just a waste of time? The relevant signals for reference, from man 7 signal Signal Value Action Comment ────────────────────────────────────────────────────────────────────── SIGHUP 1 Term Hangup detected on controlling terminal or death of controlling process SIGINT 2 Term Interrupt from keyboard SIGQUIT 3 Core Quit from keyboard SIGKILL 9 Term Kill signal SIGPIPE 13 Term Broken pipe: write to pipe with no readers SIGTERM 15 Term Termination signal
Asked by Volker Siegel (17703 rep)
Jul 29, 2014, 03:05 PM
Last activity: Jun 3, 2020, 07:15 PM