mikros: Fix reporting 0 bytes read when STDOUT/ERR is written with no open FD
This commit is contained in:
parent
dbfeb119b5
commit
f4f2e55ee6
@ -46,7 +46,7 @@ fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||
//}
|
||||
//Ok(buf.len())
|
||||
let Some(fd) = *STDOUT_FD.get().unwrap() else {
|
||||
return Ok(0);
|
||||
return Ok(buf.len());
|
||||
};
|
||||
let file = File { fs_pid: fd.0, fd: fd.1 };
|
||||
let res = file.write(buf);
|
||||
@ -74,7 +74,7 @@ fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||
//}
|
||||
//Ok(buf.len())
|
||||
let Some(fd) = *STDERR_FD.get().unwrap() else {
|
||||
return Ok(0);
|
||||
return Ok(buf.len());
|
||||
};
|
||||
let file = File { fs_pid: fd.0, fd: fd.1 };
|
||||
let res = file.write(buf);
|
||||
|
Loading…
Reference in New Issue
Block a user