Try again: in unix like system, set foreground process while running external command (#6273)

* Revert "Fix intermittent test crash (#6268)"

This reverts commit 555d9ee763.

* make a working version again

* try second impl

* add

* fmt

* check stdin is atty before acquire stdin

* add libc

* clean comment

* fix typo
This commit is contained in:
WindSoilder
2022-08-18 18:41:01 +08:00
committed by GitHub
parent df3b6d9d26
commit 1d18f6947e
7 changed files with 192 additions and 11 deletions

View File

@ -1,10 +1,15 @@
mod foreground;
#[cfg(any(target_os = "android", target_os = "linux"))]
mod linux;
#[cfg(target_os = "macos")]
mod macos;
#[cfg(target_family = "unix")]
pub mod signal;
#[cfg(target_os = "windows")]
mod windows;
pub use self::foreground::{ForegroundChild, ForegroundProcess};
#[cfg(any(target_os = "android", target_os = "linux"))]
pub use self::linux::*;
#[cfg(target_os = "macos")]