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

Add get_executable_name() function #70

Merged
merged 3 commits into from
Jun 12, 2020
Merged

Add get_executable_name() function #70

merged 3 commits into from
Jun 12, 2020

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Jun 4, 2020

This function wraps rcutils_get_executable_name. It takes care of the allocator and throws an exception when an error occurs.

The rcutils_get_executable_name implementation doesn't set any error information when it fails, and from reading through the implementation and the documentation for the system functions it calls, an error should be extremely unlikely. A generic failure message is the best I can do.

Inspired by ros2/rcl_logging#40 (comment)

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

This function wraps rcutils_get_executable_name and takes care of the
allocator and throws an exception when an error occurs.

The rcutils_get_executable_name implementation doesn't set any error
information when it fails, and from reading through the implementation
and the documentation for the system functions it calls, an error should
be extremely unlikely. A generic failure message is the best I can do.

Signed-off-by: Scott K Logan <logans@cottsay.net>
@cottsay cottsay added enhancement New feature or request in review labels Jun 4, 2020
@cottsay cottsay requested a review from a team as a code owner June 4, 2020 23:59
@cottsay cottsay self-assigned this Jun 4, 2020
Signed-off-by: Scott K Logan <logans@cottsay.net>
Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

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

lgtm

@cottsay cottsay requested a review from hidmic June 8, 2020 22:53
test/test_process.cpp Outdated Show resolved Hide resolved
Signed-off-by: Scott K Logan <logans@cottsay.net>
@cottsay cottsay merged commit 16b579a into master Jun 12, 2020
@cottsay cottsay deleted the proc_name branch June 12, 2020 17:05
@jacobperron jacobperron mentioned this pull request Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants