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

fix: Handle SIGTERM process kill signal #6697

Merged
merged 5 commits into from
Feb 16, 2024

Conversation

mildaniel
Copy link
Contributor

Which issue(s) does this change fix?

#6688

Why is this change necessary?

Handles the case where a local service starts up, and is terminated by a non-control-c (SIGINT) signal.
For example, users running SAM CLI inside of a Docker container will see issues where containers aren't cleaned up since Docker sends a SIGTERM signal which is currently unhandled by SAM CLI.

How does it address the issue?

Adds a SIGTERM handler that unblocks the thread and control flow is handed back to the main thread to finish execution/clean-up.

What side effects does this change have?

N/A

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • Add input/output type hints to new functions/methods
  • Write design document if needed (Do I need to write a design document?)
  • Write/update unit tests
  • Write/update integration tests
  • Write/update functional tests if needed
  • make pr passes
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mildaniel mildaniel requested a review from a team as a code owner February 15, 2024 00:09
@mildaniel mildaniel enabled auto-merge February 16, 2024 20:10
@mildaniel mildaniel added this pull request to the merge queue Feb 16, 2024
Merged via the queue into aws:develop with commit 8c7a339 Feb 16, 2024
55 checks passed
@mildaniel mildaniel deleted the handle-sigterm-interrupt branch February 16, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants