-
Notifications
You must be signed in to change notification settings - Fork 31
Freebsd kqueue waitable child #91
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
base: master
Are you sure you want to change the base?
Conversation
src/reaper/wait.rs
Outdated
let exit_filter = unsafe { Filter::new(Exit::from_pid(NonZeroI32::new_unchecked( | ||
child | ||
.id() | ||
.try_into() | ||
.expect("could not transform pid to i32 type") | ||
)))? | ||
}; |
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.
Can you reformat this to match rusfmt formatting? Unfortunately rustfmt doesn't auto-format code in macro blocks.
@rogercoll I'm back, can you rebase on |
5e7c2b5
to
a803019
Compare
Done, not sure if the failure of macos CI is related to this PR 🤔 Thanks! |
It's a bug in |
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.
This can be done for all of the following platforms, right?
#[cfg(any(
target_vendor = "apple",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd",
target_os = "dragonfly",
))]
Implements the WaitableChild struct for
freebsd
systems. In addition, the Wait approach will be used by default for freebsd systems.The PR explicitly implements the WaitableChild only for
freebsd
, that is because of the lack of testing in other BSD systems. I would expect other systems supporting thekqueue
event notification interface to work as well (NetBSD, OpenBSD, DragonFly BSD, and macOS). Would it make sense to extend the implementation to cover these OSes too?Usage of smol-rs/async-io#207
Tests: all tests run with the WaitableChild instance.