-
Notifications
You must be signed in to change notification settings - Fork 9
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
[crashtracker] Enable collecting to a UNIX socket #420
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #420 +/- ##
==========================================
- Coverage 69.05% 68.76% -0.29%
==========================================
Files 195 195
Lines 25901 26009 +108
==========================================
Hits 17886 17886
- Misses 8015 8123 +108
|
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.
Looks good. I don't really have any precise feedback. I don't know of any scenarios where these anonymous unix domain sockets might fail to be created on platforms that support them (resource exhaustion?), but I expect many other parts of most tracers will fail in that situation before this code does.
} | ||
|
||
Ok(()) | ||
} | ||
|
||
pub fn socket_is_writable(_socket_path: &str) -> bool { | ||
// TODO, implement this |
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.
What's the intent for this? One could inspect the type of the socket and prctrl or whatever some socket options, but in general in can be hard to infer that a socket is truly writable--right?
Just the same, maybe there's value in knowing for certain that a socket is not writable, and so this function would be valuable even in its current form. 8)
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.
The use is to fail early with an error message when the socket is not writable, indeed :)
What does this PR do?
A brief description of the change being made with this pull request.
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
How to test the change?
Describe here in detail how the change can be validated.