-
Notifications
You must be signed in to change notification settings - Fork 914
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
roslaunch: ensure pid file is removed on exit #1057
Conversation
68d9c9f
to
7436467
Compare
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.
Please edit the PR to target the latest development branch lunar-devel
.
try: os.unlink(options.pid_fn) | ||
except os.error: pass | ||
except: | ||
pass |
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.
Why should this catch and ignore arbitrary exceptions?
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.
@dirk-thomas Thank you for review! I have no reason. Removed try
.
7436467
to
0968d97
Compare
The patch looks good now. Can you please still edit the PR to target the latest development branch lunar-devel ("edit" button right beside the issue title). |
@dirk-thomas Changed base branch to |
You will need to rebase your patch to the new target branch. |
0968d97
to
d469733
Compare
@dirk-thomas Done! |
Thank you! |
If
--pid
option is set, pid file is written at https://github.com/ros/ros_comm/blob/lunar-devel/tools/roslaunch/src/roslaunch/__init__.py#L257 but codes for removing written pid file is underif-else
condition (so there can be conditions thatroslaunch
process dies but pid file is left without removal)This pull request moves the code for pid file removal to main
try-except-finally
block so to ensure pid file is removed if exists.