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: Tue, 29 Jul 2025 12:10:26 -0700
On 2025-07-29 10:11, Collin Funk wrote:

>> And that wasn't the worst device I used to write programs!
> I'm curious, what is the worst?

The IBM 029 card punch, introduced in 1964, was worse.

https://en.wikipedia.org/wiki/Keypunch#IBM_029_Card_Punch

Also, the Qume QVT-102, introduced in 1983. Terrible keyboard. Gave me 
carpal tunnel syndrome.

https://terminals-wiki.org/wiki/index.php/Qume_QVT-102


>>> +  if (pause_option && close (tty_fd) < 0)
>>> +    error (EXIT_FAILURE, errno, "%s", quotef ("/dev/tty"));
>>
>> Why are these lines useful? As far as I can see they merely add
>> complexity for no benefit. How about removing them? (If we kept them
>> we would need to fix the bug in them; but let's remove them.)
> 
> I assume we would want to close the file descriptors that we open at the
> end of the program. If so, I guess there is no point in checking for
> errors from 'close'. Or is the close not nessecary, similar to calling
> 'free' on memory just before exit?

Yes, the latter. Files are automatically closed on exit.

We check for error when closing output fds because some filesystems 
delay error reporting until close. There's less of a reason to check for 
closing input fds just before exit. Here, I can't think of any reason.






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.