mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-13 13:46:46 +00:00
runtime-rs: open stdout and stderr fifos NONBLOCK
This patch adds O_NONBLOCK flag when open stdout and stderr FIFOs to avoid blocking. Fixes: #6714 Signed-off-by: Zixuan Tan <tanzixuan.me@gmail.com>
This commit is contained in:
parent
3eb4bed957
commit
89be42a177
@ -98,6 +98,7 @@ impl PassfdIo {
|
||||
if let Some(stdout) = &self.stdout {
|
||||
let fout = OpenOptions::new()
|
||||
.write(true)
|
||||
.custom_flags(libc::O_NONBLOCK)
|
||||
.open(&stdout)
|
||||
.context("open stdout")?;
|
||||
|
||||
@ -113,6 +114,7 @@ impl PassfdIo {
|
||||
if let Some(stderr) = &self.stderr {
|
||||
let ferr = OpenOptions::new()
|
||||
.write(true)
|
||||
.custom_flags(libc::O_NONBLOCK)
|
||||
.open(&stderr)
|
||||
.context("open stderr")?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user