oconnor663 / shared_child.rs

a wrapper around std::process::Child that lets multiple threads wait or kill at once
MIT License
39 stars 7 forks source link

support for OpenBSD, NetBSD, and older versions of OSX #4

Open oconnor663 opened 7 years ago

oconnor663 commented 7 years ago

waitid can probably be exposed on the BSDs. Here's a naive attempt to do that: https://github.com/rust-lang/libc/pull/520

For OSX, if the warnings are to be believed (https://bugs.python.org/msg167016), there are some versions with broken waitid implementations. If we ever run into those, we can add fake "best efford" implementations based on waitpid?

oconnor663 commented 7 years ago

Once try_wait lands in stable, we can consider using the "non-blocking wait in a loop with sleeps" strategy. Doing that with libc::waitpid right now would leave the Child in an invalid state, though, which is a no-no for into_inner.