Skip to content

Add --grace-period flag - #70

Closed
mdavidsaver wants to merge 2 commits into
ralphlange:masterfrom
mdavidsaver:add-grace-period
Closed

Add --grace-period flag#70
mdavidsaver wants to merge 2 commits into
ralphlange:masterfrom
mdavidsaver:add-grace-period

Conversation

@mdavidsaver

Copy link
Copy Markdown
Collaborator

Add --grace-period flag. Combines with --killsig to allow time for a graceful child shutdown during procServ shutdown.

By default, no change. If a killsig other than SIGKILL is selected, along with a non-zero grace period, then when procServ receives SIGTERM:

  1. Send killsig to child
  2. wait up to grace-period
  3. If child remains, then issue SIGKILL
  4. procServ exit

There are some whitespace changes in a separate commit.

Combines with --killsig to allow time for a graceful child shutdown
during procServ shutdown.

By default, no change.

If a killsig other than SIGKILL is selected, along with a non-zero
grace period, then when procServ receives SIGTERM:

1. Send killsig to child
2. wait up to grace-period
3. If child remains, then issue SIGKILL
4. procServ exit
@mdavidsaver

Copy link
Copy Markdown
Collaborator Author

The basic logic is to add another variable to main() (stopAt) which is set to a non-zero value when a graceful shutdown is in-progress.

Documentation update waiting on #68.

@mdavidsaver

Copy link
Copy Markdown
Collaborator Author

cf. epics-base/epics-base#670

@ralphlange

Copy link
Copy Markdown
Owner

Looks good to me.

@mdavidsaver

Copy link
Copy Markdown
Collaborator Author

Superseded by #75.

ralphlange added a commit that referenced this pull request Jun 26, 2026
Combines with --killsig tichael Davidsavero allow time for a graceful child shutdown
during procServ shutdown.

By default, no change.

If a killsig other than SIGKILL is selected, along with a non-zero
grace period, then when procServ receives SIGTERM:

1. Send killsig to child
2. wait up to grace-period
3. If child remains, issue SIGKILL
4. procServ exit

- also add --grace-period to procServUtils and documentation

Based on PR #70 by Michael Davidsaver.
(closes #70; closes #75)

Co-authored-by: Michael Davidsaver <mdavidsaver@gmail.com>
Co-authored-by: google-labs-jules[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants