-
Notifications
You must be signed in to change notification settings - Fork 682
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
Update signalfd #309
Update signalfd #309
Conversation
flags SfdFlags: c_int { | ||
const SFD_NONBLOCK = 0o00004000, // O_NONBLOCK | ||
const SFD_CLOEXEC = 0o02000000, // O_CLOEXEC | ||
flags SfdFlags: libc::c_int { |
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.
In most code we bring c_int
and other common types into the module namespace rather than accessing through libc
-- not sure if this is worth promoting as a convention or if it is an important style element (obviously, it makes no functional difference). CC @kamalmarhubi
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.
We do not have a convention on this yet. I would prefer module level imports, because they are shorter in general. This is a purely aesthetic argument, and thus not very strong. But I have no other arguments for or against either option.
This does, however, not have any relevance for this PR.
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.
I've just been following the convention in the file. I don't have strong feelings in either direction. For common types, I agree module level is shorter, and for nix we're pretty clear on where they would be coming from.
LGTM, but I'll let another reviewer in. r? @kamalmarhubi |
@homu r+ |
📌 Commit 19ad8ca has been approved by |
Update signalfd Update `signalfd` to use types and functions from `libc`. It is a breaking change, because: - renamed pub const `CREATE_NEW_FD` to `SIGNALFD_NEW` - renamed pub const `SIGINFO_SIZE` to `SIGNALFD_SIGINFO_SIZE` - removed pub const `SIGINFO_PADDING` Fixes #307
Thanks @alex-gulyas for noticing and fixing this! |
☀️ Test successful - status |
Update
signalfd
to use types and functions fromlibc
.It is a breaking change, because:
CREATE_NEW_FD
toSIGNALFD_NEW
SIGINFO_SIZE
toSIGNALFD_SIGINFO_SIZE
SIGINFO_PADDING
Fixes #307