mikros: Make stdio inheriting the default on process spawn
This commit is contained in:
parent
7a029c4a0a
commit
05d2060582
@ -107,23 +107,20 @@ pub fn spawn(
|
||||
_needs_stdin: bool,
|
||||
) -> io::Result<(Process, StdioPipes)> {
|
||||
let stdin = match self.stdin.take() {
|
||||
None => None,
|
||||
Some(Stdio::Null) => None,
|
||||
Some(Stdio::Inherit) => *STDIN_FD.get().unwrap(),
|
||||
None | Some(Stdio::Inherit) => *STDIN_FD.get().unwrap(),
|
||||
Some(Stdio::MakePipe) => todo!(),
|
||||
Some(Stdio::InheritFile(file)) => Some((file.fs_pid, file.fd)),
|
||||
};
|
||||
let stdout = match self.stdout.take() {
|
||||
None => None,
|
||||
Some(Stdio::Null) => None,
|
||||
Some(Stdio::Inherit) => *STDOUT_FD.get().unwrap(),
|
||||
None | Some(Stdio::Inherit) => *STDOUT_FD.get().unwrap(),
|
||||
Some(Stdio::MakePipe) => todo!(),
|
||||
Some(Stdio::InheritFile(file)) => Some((file.fs_pid, file.fd)),
|
||||
};
|
||||
let stderr = match self.stderr.take() {
|
||||
None => None,
|
||||
Some(Stdio::Null) => None,
|
||||
Some(Stdio::Inherit) => *STDERR_FD.get().unwrap(),
|
||||
None | Some(Stdio::Inherit) => *STDERR_FD.get().unwrap(),
|
||||
Some(Stdio::MakePipe) => todo!(),
|
||||
Some(Stdio::InheritFile(file)) => Some((file.fs_pid, file.fd)),
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user