mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 14:32:33 +00:00
runtime-rs: Fix the issues with stderr fifo
When tty is enabled, stderr fifo should never be opened. Fixes: #10637 Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
This commit is contained in:
parent
037281d699
commit
b4695f6303
@ -128,11 +128,13 @@ impl Process {
|
|||||||
|
|
||||||
pub fn pre_fifos_open(&mut self) -> Result<()> {
|
pub fn pre_fifos_open(&mut self) -> Result<()> {
|
||||||
if let Some(ref stdout) = self.stdout {
|
if let Some(ref stdout) = self.stdout {
|
||||||
self.stdout_r = Some(open_fifo_read(stdout)?);
|
self.stdout_r = Some(open_fifo_read(stdout).context("open stdout")?);
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(ref stderr) = self.stderr {
|
if !self.terminal {
|
||||||
self.stderr_r = Some(open_fifo_read(stderr)?);
|
if let Some(ref stderr) = self.stderr {
|
||||||
|
self.stderr_r = Some(open_fifo_read(stderr).context("open stderr")?);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user