Skip to content

Conversation

BenasB
Copy link
Contributor

@BenasB BenasB commented Apr 17, 2025

Hi 👋

This PR adds crude SIGTERM and SIGINT signal handling to call server.Shutdown and allow the program to successfully shutdown with the 0 exit code.

closes #109

Testing

I manually tested the following scenarios after running process-exporter and:

  1. Calling pkill -15 process-exporte
  2. Calling pkill -2 process-exporte
  3. Pressing Ctrl + C

and then checking the exit code with echo $? which should be 0

@ncabatoff ncabatoff merged commit ad3b5ba into ncabatoff:master Apr 21, 2025
1 check passed
@ncabatoff
Copy link
Owner

Thanks @BenasB !

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.

Handle signals for graceful shutdown

2 participants