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

SIGTERM support for graceful shutdown #13

Merged

Conversation

0kate
Copy link
Contributor

@0kate 0kate commented Apr 30, 2023

Description of the changes

  1. Additional option to specify a signal type: I have added an option to specify signal types to killport cli. (like a traditional unix kill command)
  • We can set -s/ --signal option to specify signal type.
  • e.g. killport -s sigterm 8080
  1. SIGTERM support: We can specify -s sigterm option for graceful shutdown.

Related issue(s)

This PR is related to the issue #8.
But this is not completely support for all signal types.

Type of change
Please select one or multiple of the following options:

  • Bug fix (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)
  • Code cleanup (refactoring or improving code quality)
  • Documentation update (adding or updating documentation, updating README)

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Additional information
Add any other information or screenshots about the pull request here.

@jkfran jkfran self-assigned this May 2, 2023
Copy link
Owner

@jkfran jkfran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much @0kate , I added a few small change requests. Let me know if you are okay with them.

README.md Outdated Show resolved Hide resolved
src/main.rs Outdated Show resolved Hide resolved
@0kate
Copy link
Contributor Author

0kate commented May 2, 2023

@jkfran
Thank you for your review!
I have applied some changes about your change requests. Please confirm that again 🙏

@0kate 0kate requested a review from jkfran May 2, 2023 11:18
Copy link
Owner

@jkfran jkfran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much! @0kate

@jkfran jkfran merged commit 937169e into jkfran:main May 2, 2023
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.

2 participants