https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293217
Bug ID: 293217
Summary: grep(1) reads EOF twice from interactive stdin before
quitting
Product: Base System
Version: Unspecified
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: [email protected]
Reporter: [email protected]
Running `grep(1)` interactively and immediately pressing control+d to send an
EOF, it registers the ^D but then requires a *second* control+d to actually
quit. On both OpenBSD & Ubuntu, grep(1) quits immediately at the first
control+d as expected:
$ grep x
^D
^D
If a line of any other input is provided before the control+d it behaves
properly.
$ grep x
hello
^D
(this was encountered while testing the exit status code for `grep` and `grep
-v` on various inputs including empty)
--
You are receiving this mail because:
You are the assignee for the bug.