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

Transfer daemon socket ownership on spawn. #652

Merged
merged 4 commits into from
Jul 15, 2021

Conversation

hidmic
Copy link
Contributor

@hidmic hidmic commented Jul 12, 2021

This patch is an alternative to #632, transferring socket ownership on spawn to preclude the TOCTOU races that running daemon checks induce.

This patch is functional in my local Linux environment. Let's see what CI (and Windows) have to say:

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

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
@hidmic
Copy link
Contributor Author

hidmic commented Jul 12, 2021

Once CI goes green, I'll document things better.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
@hidmic
Copy link
Contributor Author

hidmic commented Jul 12, 2021

Alright, it looks like this is working like a charm 😃

Copy link
Member

@ivanpauno ivanpauno left a comment

Choose a reason for hiding this comment

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

I have some comments and questions.
The refactor sounds good to me, but the code is a bit tricky.

ros2cli/ros2cli/daemon/daemonize.py Show resolved Hide resolved
ros2cli/ros2cli/daemon/daemonize.py Show resolved Hide resolved
ros2cli/ros2cli/daemon/__init__.py Show resolved Hide resolved
ros2cli/ros2cli/daemon/__init__.py Show resolved Hide resolved
ros2cli/ros2cli/node/network_aware.py Show resolved Hide resolved
ros2cli/ros2cli/xmlrpc/local_server.py Show resolved Hide resolved
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
@hidmic
Copy link
Contributor Author

hidmic commented Jul 14, 2021

CI up to ros2cli:

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

@hidmic hidmic requested a review from ivanpauno July 14, 2021 22:41
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
@hidmic
Copy link
Contributor Author

hidmic commented Jul 15, 2021

Alright, all green. Going in !

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.

2 participants