2022-09-29 18:37:48 +00:00
|
|
|
mod foreground;
|
2022-03-26 18:21:19 +00:00
|
|
|
#[cfg(any(target_os = "android", target_os = "linux"))]
|
2022-01-14 06:20:53 +00:00
|
|
|
mod linux;
|
|
|
|
#[cfg(target_os = "macos")]
|
|
|
|
mod macos;
|
2023-09-01 06:18:55 +00:00
|
|
|
pub mod os_info;
|
2022-01-14 06:20:53 +00:00
|
|
|
#[cfg(target_os = "windows")]
|
|
|
|
mod windows;
|
|
|
|
|
Do not block signals for child processes (#11402)
# Description / User-Facing Changes
Signals are no longer blocked for child processes launched from both
interactive and non-interactive mode. The only exception is that
`SIGTSTP`, `SIGTTIN`, and `SIGTTOU` remain blocked for child processes
launched only from **interactive** mode. This is to help prevent nushell
from getting into an unrecoverable state, since we don't support
background jobs. Anyways, this fully fixes #9026.
# Other Notes
- Needs Rust version `>= 1.66` for a fix in
`std::process::Command::spawn`, but it looks our current Rust version is
way above this.
- Uses `sigaction` instead of `signal`, since the behavior of `signal`
can apparently differ across systems. Also, the `sigaction` man page
says:
> The sigaction() function supersedes the signal() function, and should
be used in preference.
Additionally, using both `sigaction` and `signal` is not recommended.
Since we were already using `sigaction` in some places (and possibly
some of our dependencies as well), this PR replaces all usages of
`signal`.
# Tests
Might want to wait for #11178 for testing.
2024-01-15 22:08:21 +00:00
|
|
|
pub use self::foreground::ForegroundChild;
|
2022-03-26 18:21:19 +00:00
|
|
|
#[cfg(any(target_os = "android", target_os = "linux"))]
|
2022-01-14 06:20:53 +00:00
|
|
|
pub use self::linux::*;
|
|
|
|
#[cfg(target_os = "macos")]
|
|
|
|
pub use self::macos::*;
|
|
|
|
#[cfg(target_os = "windows")]
|
|
|
|
pub use self::windows::*;
|