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

px4_posix: add px4_exit() #12077

Merged
merged 1 commit into from
May 27, 2019
Merged

px4_posix: add px4_exit() #12077

merged 1 commit into from
May 27, 2019

Conversation

TSC21
Copy link
Member

@TSC21 TSC21 commented May 26, 2019

Describe problem solved by the proposed pull request
While doing some adaptations on the uavcan driver, I faced that, for a POSIX target, one bumps into error: attempt to use poisoned "exit".

Test data / coverage
Tested under SITL.

Describe your preferred solution
This solution creates a px4_exit(status) under px4_posix.h, replacing the exit() call with a return call.

Additional context
I don't have any clear usage on the current source code, but maybe there is. @julianoes @dagar maybe you can point out some places where we can use this as a replacement to the exit calls.

TODO

  • Add usage?

@TSC21 TSC21 requested a review from julianoes May 26, 2019 11:00
Copy link
Contributor

@julianoes julianoes left a comment

Choose a reason for hiding this comment

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

I think this is fine for now but it won't work in general because it depends on the function having return type int (and not void).

@TSC21
Copy link
Member Author

TSC21 commented May 27, 2019

I think this is fine for now but it won't work in general because it depends on the function having return type int (and not void).

I guess I can make it more general in that sense.

@bkueng
Copy link
Member

bkueng commented May 27, 2019

Can you look into where and why uavcan is using it?

@LorenzMeier LorenzMeier merged commit bd87bee into master May 27, 2019
@LorenzMeier LorenzMeier deleted the add_px4_exit branch May 27, 2019 13:22
@TSC21
Copy link
Member Author

TSC21 commented May 30, 2019

Can you look into where and why uavcan is using it?

Yest I can and I can replace it on a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants