-
Notifications
You must be signed in to change notification settings - Fork 16
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
Use exec instead of popen to run ign-launch binary #151
Conversation
Signed-off-by: Addisu Z. Taddese <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-launch5 #151 +/- ##
============================================
Coverage 32.92% 32.92%
============================================
Files 4 4
Lines 817 817
============================================
Hits 269 269
Misses 548 548 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with this package, but is there a possible case whereign launch ...
launches one more process in addition to ign-launch
binary ?
I don't think so. All the processes that are in the launch file are started by the |
See gazebosim/gz-launch#151 for more context. Signed-off-by: Addisu Z. Taddese <[email protected]>
This pull request has been mentioned on Gazebo Community. There might be relevant details there: https://community.gazebosim.org/t/new-ignition-releases-2022-03-25-fortress-edifice-citadel/1343/1 |
🦟 Bug fix
Fixes #149
Summary
Currently, the ruby processes creates a new process to run the
ign-launch
binary. For some reason, signals sent to the ruby processes don't propagate to the child process. In addition to the issue described in #149, sending aSIGINT
signal (or evenSIGKILL
) directly viakill
to the parent process doesn't terminate the launched process.For example, launch the following:
sleep.ign
Launch with:
ign launch sleep.ign
The process list shows there are two processes associated with the launch
Killing the top/parent process does not terminate the child
https://www.vidarholen.net/contents/blog/?p=34 explains the problem (which I learned about from ros2/launch#484).
The solution I propose is to replace the ruby process with the
ign-launch
process usingexec
. Here's the process list with the new approach.Checklist
codecheck
passed (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-by
messages.