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 SIGTERM not behaving the same as SIGINT #4163

Merged
merged 1 commit into from
Jun 15, 2022

Conversation

asdacap
Copy link
Contributor

@asdacap asdacap commented Jun 15, 2022

Resolves #4057

Changes:

  • Hold process exit handler until app finish cancelling tasks.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Testing

Run "kill -s SIGTERM pidof Nethermind.Runner", confirmed final log now show up like SIGINT.

@LukaszRozmej
Copy link
Member

Isn't it a problem that we have 2xWait for 1xSet?

@asdacap
Copy link
Contributor Author

asdacap commented Jun 15, 2022

We do? I thought its basically a Countdownlatch. https://docs.microsoft.com/en-us/dotnet/api/system.threading.manualresetevent?view=net-6.0 so it's suppose to work for that.

@LukaszRozmej
Copy link
Member

sorry got confused

@LukaszRozmej LukaszRozmej merged commit 85bf998 into master Jun 15, 2022
@LukaszRozmej LukaszRozmej deleted the fix-sigterm-handling branch June 15, 2022 13:45
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.

Nethermind in Docker shuts down incorrectly due to SIGTERM instead of SIGINT
2 participants