-
Notifications
You must be signed in to change notification settings - Fork 38
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
[#264] add unique ids #353
[#264] add unique ids #353
Conversation
@@ -17,9 +17,9 @@ use crate::posix::types::*; | |||
|
|||
pub unsafe fn proc_pidpath(pid: pid_t, buffer: *mut c_char, buffer_len: size_t) -> isize { | |||
let path = if pid == crate::internal::getpid() { | |||
"/proc/self/exe".to_owned() | |||
"/proc/self/exe\0".to_owned() |
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.
Forgot here that rust string literals are not 0 terminated ... Thankfully the address sanitizer on the C++ side found it.
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.
Only half way through, but it's too late for today
d7ffe63
to
c21c5e9
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #353 +/- ##
==========================================
+ Coverage 80.28% 80.31% +0.02%
==========================================
Files 192 192
Lines 22569 22569
==========================================
+ Hits 18120 18126 +6
+ Misses 4449 4443 -6
|
…r consistency between file and default construction
6b10fd6
to
0b7fb6f
Compare
@@ -281,7 +281,7 @@ impl Default for Config { | |||
Self { | |||
global: Global { | |||
root_path_unix: Path::new(b"/tmp/iceoryx2/").unwrap(), | |||
root_path_windows: Path::new(b"C:\\Temp\\iceoryx2\\").unwrap(), | |||
root_path_windows: Path::new(b"c:\\Temp\\iceoryx2\\").unwrap(), |
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.
Food for thought and nothing for this PR.
What do you think of using the forward slash /
for Windows paths? It is recommended for C# developers. From here
If you prefer to hard-code the directory separator character, you should use the forward slash (/) character. It is the only recognized directory separator character on Unix systems, as the output from the example shows, and is the AltDirectorySeparatorChar on Windows.
This prevents the insanity of things like C:\\\\\\\\Temp
when the string is passed down a few layers and each one removes one of the escape characters.
Notes for Reviewer
Pre-Review Checklist for the PR Author
SPDX-License-Identifier: Apache-2.0 OR MIT
iox2-123-introduce-posix-ipc-example
)[#123] Add posix ipc example
)task-list-completed
)Checklist for the PR Reviewer
Post-review Checklist for the PR Author
References
Closes #264