GNU bug report logs -
#47243
pr lacks -p
Previous Next
Full log
Message #76 received at 47243 <at> debbugs.gnu.org (full text, mbox):
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.