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

Handle SIGTERM on Linux #1174

Closed
alnlarsen opened this issue Jul 17, 2023 · 2 comments · Fixed by #1176
Closed

Handle SIGTERM on Linux #1174

alnlarsen opened this issue Jul 17, 2023 · 2 comments · Fixed by #1176
Assignees
Labels
Add test Test case(s) must be created for the functionality described in this issue Feature
Milestone

Comments

@alnlarsen
Copy link
Collaborator

OpenTAP currently handles SIGINT by aborting the root TapThread context. This is great for a graceful shutdown, as any plugin can register cleanup hooks in their context.

However, SIGINT is typically limited to keyboard interrupts (e.g. CTRL-C) unless specifically sent. On Linux systems, a graceful shutdown is typically requested with the SIGTERM signal. This is the case for e.g. Kubernetes where OpenTAP is often deployed.

I propose assigning SIGTERM to the same hook as SIGINT is currently assigned, such that a pod receiving a SIGTERM signal gets the same behavior as typing CTRL-C in a terminal.

@github-actions
Copy link

A fix for this is in OpenTAP version 9.22.0-beta.8+bedfc82f or later.

@sebastian-pop sebastian-pop added the Add test Test case(s) must be created for the functionality described in this issue label Jul 20, 2023
@sebastian-pop
Copy link
Collaborator

Implemented. Verified on 9.22.0-rc.2

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add test Test case(s) must be created for the functionality described in this issue Feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants