-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce SIGKILL to ensure process has terminated after MAXWAIT #9
Conversation
Signed-off-by: lusitania <[email protected]>
echo -n " ." | ||
|
||
if test $i -gt $MAXWAIT; then | ||
if (( $i > $MAXWAIT )); then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an unrelated change. Please move it into a separate commit.
@@ -12,6 +12,10 @@ USE_COLLECTDMON=1 | |||
# default: 30 | |||
MAXWAIT=30 | |||
|
|||
# try a terminal kill -9 if the process refuses to shut down | |||
# default: 0 | |||
declare -i USE_SIGKILL=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very generic name, missing the context of where this would be applied. Can you think of something better? I don't have a good idea myself yet but something along the lines of KILL_AFTER_WAIT or similar.
@@ -12,6 +12,10 @@ USE_COLLECTDMON=1 | |||
# default: 30 | |||
MAXWAIT=30 | |||
|
|||
# try a terminal kill -9 if the process refuses to shut down | |||
# default: 0 | |||
declare -i USE_SIGKILL=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will set the default value to 1 instead of 0.
@@ -12,6 +12,10 @@ USE_COLLECTDMON=1 | |||
# default: 30 | |||
MAXWAIT=30 | |||
|
|||
# try a terminal kill -9 if the process refuses to shut down | |||
# default: 0 | |||
declare -i USE_SIGKILL=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with other settings, please don't use declare
. I'm fine with a separate commit changing this globally.
Any update on this? On second thought, I think it would be better to convert this code to use start-stop-daemon's --retry flag. |
This PR enables the init script to SIGKILL the process group of the service after MAXWAIT has expired. The feature is set in
/etc/default/collectd
and enabled by default: