Skip to content

Conversation

@zimbatm
Copy link
Member

@zimbatm zimbatm commented Nov 18, 2024

Trap termination signals in the main program using context.Context.

If a SIGINT or SIGTERM is received, send a SIGTERM to the sub-programs and wait for them to shutdown gracefully.

If the sub-program is stuck for 5 minutes, force-kill them.

Replaces #63

@zimbatm zimbatm requested review from jfroche and r-vdp November 18, 2024 12:43
Trap termination signals in the main program using context.Context.

If a SIGINT or SIGTERM is received, send a SIGTERM to the sub-programs
and wait for them to shutdown gracefully.

If the sub-program is stuck for 5 minutes, force-kill them.
Copy link
Member

@r-vdp r-vdp left a comment

Choose a reason for hiding this comment

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

Works perfectly!

@r-vdp r-vdp merged commit eaa6260 into main Nov 21, 2024
6 checks passed
@zimbatm zimbatm deleted the graceful-shutdown branch November 21, 2024 13:17
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.

3 participants