Add the ability to send a signal to a subprocess#127
Open
mjcarroll wants to merge 8 commits into
Open
Conversation
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## gz-utils2 #127 +/- ##
=============================================
+ Coverage 80.98% 81.51% +0.52%
=============================================
Files 8 8
Lines 384 395 +11
=============================================
+ Hits 311 322 +11
Misses 73 73 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
azeey
requested changes
Apr 1, 2024
| int signum) | ||
| { | ||
| #if defined(_WIN32) | ||
| return GenerateConsoleCtrlEvent(signum, process->hProcess); |
Contributor
There was a problem hiding this comment.
Seems like this is not compiling on windows.
Author
There was a problem hiding this comment.
Yeah, I haven't had a chance to boot my laptop today. will take a look in a bit.
Author
There was a problem hiding this comment.
Actually, hold, this doesn't fix the test I was trying to fix.
added 7 commits
April 1, 2024 20:18
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Contributor
|
@mjcarroll do we want to try to get this into Ionic? |
9 tasks
Contributor
|
@traversaro do you think we need this to for the standalone binaries to work on Windows? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎉 New feature
Summary
Adds
Subprocess::SignalandSubprocess::SendExitSignal.We discovered that using
kill -9in transport tests was too aggressive and not letting the subprocess shut down cleanly. This allows you to send SIGINT on Linux or CTRL_C_EVENT/CTRL_BREAK_EVENT on Windows to cause the subprocess to shut down cleanly.The changes to
subprocess.hwill be submitted upstream so that next time we pull we will get them from there.Test it
Added a unit test.
Checklist
codecheckpassed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-bymessages.