diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/proclist.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/proclist.rs b/src/proclist.rs index 9a747c2..79036b9 100644 --- a/src/proclist.rs +++ b/src/proclist.rs @@ -1,6 +1,7 @@ use std::sync::{Arc, Mutex}; use std::sync::mpsc::Sender; use std::process::Child; +use std::os::unix::process::CommandExt; use std::io::{BufRead, BufReader}; use termion::event::Key; @@ -76,8 +77,7 @@ impl ListView<Vec<Process>> { .arg(cmd) .stdin(std::process::Stdio::null()) .stdout(std::process::Stdio::piped()) - //.stderr(unsafe { Stdio::from_raw_fd(2) }) - .stderr(std::process::Stdio::piped()) + .before_exec(|| unsafe { libc::dup2(1, 2); Ok(()) }) .spawn()?; let mut proc = Process { cmd: cmd.to_string(), |