Subject: bug#47243: pr lacks -p

From: Paul Eggert <[email-masked]>
Date: Wed, 30 Jul 2025 13:13:41 -0700

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).