GNU bug report logs - #47243
pr lacks -p

Previous Next

Package: coreutils;

Reported by: Eric Blake <eblake <at> redhat.com>

Date: Thu, 18 Mar 2021 15:39:01 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Collin Funk <collin.funk1 <at> gmail.com>
Cc: 47243 <at> debbugs.gnu.org, Pádraig Brady <P <at> draigBrady.com>
Subject: bug#47243: pr lacks -p
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).




This bug report was last modified 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.