mirror of
https://github.com/uutils/coreutils.git
synced 2026-10-28 10:45:25 +08:00
cat: don't call stdin_was_closed on fuchsia
This commit is contained in:
1 parent
ff46288898
commit
7ce4d8cf3e
1 file changed
+1
-1
@@ -374,7 +374,7 @@ fn cat_path(path: &OsString, options: &OutputOptions, state: &mut OutputState) -
|
||||
InputType::StdIn => {
|
||||
// A closed stdin is reopened as /dev/null before `uumain` runs, so
|
||||
// reading it would succeed silently instead of failing with EBADF.
|
||||
#[cfg(unix)]
|
||||
#[cfg(all(unix, not(target_os = "fuchsia")))]
|
||||
if uucore::signals::stdin_was_closed() {
|
||||
return Err(io::Error::from(rustix::io::Errno::BADF).into());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user