bug#47243: pr lacks -p
Paul Eggert <[email protected]>
| Newsgroups | gmane.comp.gnu.core-utils.bugs |
|---|---|
| Organization | UCLA Computer Science Department |
| Message-ID | <[email protected]> |
On 2025-07-29 21:51, Collin Funk wrote: > + /* Just exit if the user presses Ctrl-D. */ > + if (bytes_read == 0) > + return; This needs reworking now that 'pause_maybe' is a separate function, as the code no longer exits, it just keeps going. One other thought. It may well be better to open /dev/tty lazily, that is, inside pause_maybe's 'while (true)' loop, just before the 'read' (assuming /dev/tty has not already been opened). That way, pr -p needn't unnecessarily fail when printing an empty file (where /dev/tty isn't needed after all).