Skip to content
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

Make stop wait for the actual termination of the children processes #16

Merged
merged 12 commits into from
May 30, 2018
Merged

Make stop wait for the actual termination of the children processes #16

merged 12 commits into from
May 30, 2018

Conversation

jfsmig
Copy link

@jfsmig jfsmig commented May 29, 2018

Helps fixing #13

The old-style "fire & forget" stopcommand is still available under the name kill.

@jfsmig jfsmig self-assigned this May 29, 2018
@jfsmig jfsmig requested review from murlock and fvennetier May 29, 2018 20:40
@jfsmig
Copy link
Author

jfsmig commented May 29, 2018

Also, an option has been introduced in gridinit named delay_sigkill to override the default of 60s before a termination attempt will send SIGKILL instead of SIGTERM.
Set delay_sigkill to 0 to never send a SIGTERM.

That variable is available in the sections [default] (it changes the global default timeout) or on each [service.*] section (to configure one child process at once).

lib/children.c Outdated
if (sd->first_kill_attempt > 0 && (now - sd->first_kill_attempt > SUPERVISOR_DEFAULT_TIMEOUT_KILL)) {
if (sd->delay_before_KILL > 0
&& sd->first_kill_attempt > 0
&& (now - sd->first_kill_attempt) > sd->delay_before_KILL) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous 2 lines are indented with spaces.

/**
* starts allt the stopped services in a state proper to be restarted
*/
/* starts allt the stopped services in a state proper to be restarted */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allt -> all

{ "status3", command_status2 },
{ "start", command_start },
{ "stop", command_stop },
{ "kill", command_kill },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To stay within the spirit, it should have been called "stop2". 😉

@fvennetier fvennetier merged commit 5a03f26 into open-io:master May 30, 2018
@jfsmig jfsmig deleted the M-stop-and-wait branch June 14, 2018 09:25
@jfsmig jfsmig restored the M-stop-and-wait branch June 14, 2018 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants