Skip to content

Conversation

Dilnawaz-khan-ops
Copy link

@Dilnawaz-khan-ops Dilnawaz-khan-ops commented Jul 16, 2025

Summary

Improves signal handling by reusing the existing InterruptContext() function and extending it to handle SIGTERM. This is useful for containers like ECS Fargate which terminate using SIGTERM.

Changes Introduced.

  • Listens for syscall.SIGTERM in addition to os.Interrupt
  • Logs signal received and when graceful shutdown is complete

Why This Matters

Without this, containers might be force-killed before completing cleanup logic. This update ensures the app exits gracefully when the platform sends a termination signal.

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.

1 participant