Skip to content

Commit ae338df

Browse files
CameronNemokosayodaCameron Nemo
authored
Add wrappers for posix_spawn related functions (#2475)
* Add wrappers for posix_spawn related functions Closes #1740 * Use Errno::result helper * chore: add changelog entry for PR * Add tests for posix_spawn function --------- Co-authored-by: kosayoda <[email protected]> Co-authored-by: Cameron Nemo <[email protected]>
1 parent 43b7a74 commit ae338df

File tree

5 files changed

+513
-0
lines changed

5 files changed

+513
-0
lines changed

changelog/2475.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added wrappers for `posix_spawn` API

src/lib.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,18 @@ pub mod unistd;
184184
#[cfg(any(feature = "poll", feature = "event"))]
185185
mod poll_timeout;
186186

187+
#[cfg(any(
188+
target_os = "freebsd",
189+
target_os = "haiku",
190+
target_os = "linux",
191+
target_os = "netbsd",
192+
apple_targets
193+
))]
194+
feature! {
195+
#![feature = "process"]
196+
pub mod spawn;
197+
}
198+
187199
use std::ffi::{CStr, CString, OsStr};
188200
use std::mem::MaybeUninit;
189201
use std::os::unix::ffi::OsStrExt;

0 commit comments

Comments
 (0)