This repository was archived by the owner on May 31, 2025. It is now read-only.
roslaunch: ensure pid file is removed on exit#1057
Merged
dirk-thomas merged 1 commit intoros:lunar-develfrom May 24, 2017
Merged
roslaunch: ensure pid file is removed on exit#1057dirk-thomas merged 1 commit intoros:lunar-develfrom
dirk-thomas merged 1 commit intoros:lunar-develfrom
Conversation
68d9c9f to
7436467
Compare
dirk-thomas
reviewed
May 18, 2017
Member
dirk-thomas
left a comment
There was a problem hiding this comment.
Please edit the PR to target the latest development branch lunar-devel.
| try: os.unlink(options.pid_fn) | ||
| except os.error: pass | ||
| except: | ||
| pass |
Member
There was a problem hiding this comment.
Why should this catch and ignore arbitrary exceptions?
Contributor
Author
There was a problem hiding this comment.
@dirk-thomas Thank you for review! I have no reason. Removed try.
7436467 to
0968d97
Compare
Member
|
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). |
Contributor
Author
|
@dirk-thomas Changed base branch to |
Member
|
You will need to rebase your patch to the new target branch. |
0968d97 to
d469733
Compare
Contributor
Author
|
@dirk-thomas Done! |
Member
|
Thank you! |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
If
--pidoption 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-elsecondition (so there can be conditions thatroslaunchprocess dies but pid file is left without removal)This pull request moves the code for pid file removal to main
try-except-finallyblock so to ensure pid file is removed if exists.