diff options
| author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-09-19 12:41:30 +0200 |
|---|---|---|
| committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-09-21 17:31:25 +0200 |
| commit | dcea7709f2ce1be35ba241e923850b1099ceb906 (patch) | |
| tree | cba79acb5e56b9bb2de8f75a3ad7510410e0f101 /library/std/src/sys/unix/process | |
| parent | ae9c330629f1fb03a636cb8af367fead024793db (diff) | |
| download | rust-dcea7709f2ce1be35ba241e923850b1099ceb906.tar.gz rust-dcea7709f2ce1be35ba241e923850b1099ceb906.zip | |
added support for GNU/Hurd
Diffstat (limited to 'library/std/src/sys/unix/process')
| -rw-r--r-- | library/std/src/sys/unix/process/process_unix.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/library/std/src/sys/unix/process/process_unix.rs b/library/std/src/sys/unix/process/process_unix.rs index 75b54064501..564f8c48290 100644 --- a/library/std/src/sys/unix/process/process_unix.rs +++ b/library/std/src/sys/unix/process/process_unix.rs @@ -374,6 +374,13 @@ impl Command { return Err(io::Error::last_os_error()); } } + #[cfg(target_os = "hurd")] + { + let ret = sys::signal(libc::SIGLOST, libc::SIG_DFL); + if ret == libc::SIG_ERR { + return Err(io::Error::last_os_error()); + } + } } } @@ -620,6 +627,10 @@ impl Command { let mut default_set = MaybeUninit::<libc::sigset_t>::uninit(); cvt(sigemptyset(default_set.as_mut_ptr()))?; cvt(sigaddset(default_set.as_mut_ptr(), libc::SIGPIPE))?; + #[cfg(target_os = "hurd")] + { + cvt(sigaddset(default_set.as_mut_ptr(), libc::SIGLOST))?; + } cvt_nz(libc::posix_spawnattr_setsigdefault( attrs.0.as_mut_ptr(), default_set.as_ptr(), @@ -993,6 +1004,8 @@ fn signal_string(signal: i32) -> &'static str { target_os = "dragonfly" ))] libc::SIGINFO => " (SIGINFO)", + #[cfg(target_os = "hurd")] + libc::SIGLOST => " (SIGLOST)", _ => "", } } |
