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

Freebsd kqueue waitable child #91

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rogercoll
Copy link

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 the kqueue 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.

Comment on lines 237 to 243
let exit_filter = unsafe { Filter::new(Exit::from_pid(NonZeroI32::new_unchecked(
child
.id()
.try_into()
.expect("could not transform pid to i32 type")
)))?
};
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants