Skip to content

cat: should error when appending to input file redirected to stdin but doesn't #7165

@jfinkels

Description

@jfinkels

Environment: Ubuntu 20.04, uutil main branch (git commit d39dcad), GNU coreutils v9.6.3-3189c-dirty.

Steps to reproduce:

touch f && cat <f >>f

What happens now: uutils cat succeeds with no output.

What I expected to happen: GNU cat terminates with an error message:

cat: -: input file is output file

Notes: this is causing a failure in the GNU test file tests/cat/cat-self.sh.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions