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

missing waitid on OpenBSD #25

Open landryb opened 4 hours ago

landryb commented 4 hours ago

trying to port git-cinnabar to OpenBSD, it requires this crate, which fails to build:

error[E0425]: cannot find function `waitid` in crate `libc`
   --> /usr/obj/ports/git-cinnabar-0.6.3/git-cinnabar-0.6.3/modcargo-crates/shared_child-1.0.0/src/sys/unix.rs:52:15
    |
52  |         libc::waitid(
    |               ^^^^^^ help: a function with a similar name exists: `waitpid`
    |
   ::: /usr/obj/ports/git-cinnabar-0.6.3/git-cinnabar-0.6.3/modcargo-crates/libc-0.2.147/src/unix/mod.rs:962:5
    |
962 |     pub fn waitpid(pid: pid_t, status: *mut ::c_int, options: ::c_int) -> pid_t;
    |     ---------------------------------------------------------------------------- similarly named function `waitpid` defined here

as noted on https://docs.rs/shared_child/latest/shared_child/ a workaround would be nice :)

landryb commented 3 hours ago

ah, just realized that waitid is in the libc crate since 0.2.152 (cf https://github.com/rust-lang/libc/releases/tag/0.2.152), so bumping the dep should be enough