Skip to content

Commit

Permalink
Add wrappers for posix_spawn related functions (nix-rust#2475)
Browse files Browse the repository at this point in the history
* Add wrappers for posix_spawn related functions

Closes nix-rust#1740

* Use Errno::result helper

* chore: add changelog entry for PR

* Add tests for posix_spawn function

---------

Co-authored-by: kosayoda <git@siek.dev>
Co-authored-by: Cameron Nemo <cam@libnemo.org>
  • Loading branch information
3 people committed Aug 25, 2024
1 parent 43b7a74 commit ae338df
Show file tree
Hide file tree
Showing 5 changed files with 513 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog/2475.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added wrappers for `posix_spawn` API
12 changes: 12 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,18 @@ pub mod unistd;
#[cfg(any(feature = "poll", feature = "event"))]
mod poll_timeout;

#[cfg(any(
target_os = "freebsd",
target_os = "haiku",
target_os = "linux",
target_os = "netbsd",
apple_targets
))]
feature! {
#![feature = "process"]
pub mod spawn;
}

use std::ffi::{CStr, CString, OsStr};
use std::mem::MaybeUninit;
use std::os::unix::ffi::OsStrExt;
Expand Down
Loading

0 comments on commit ae338df

Please sign in to comment.