[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnulib] closeout doesn't always close: which is better: always
From: |
Bruno Haible |
Subject: |
Re: [Bug-gnulib] closeout doesn't always close: which is better: always or never? |
Date: |
Sat, 6 Nov 2004 17:22:01 +0100 |
User-agent: |
KMail/1.5 |
Jim Meyering wrote:
> Which is better: to close all of the time, or never?
From the point of view of minimizing system calls, the code is good as it is:
the extra close(1) is performed only when writing to a non-interactive
output stream, not when libc has provided an unbuffered stdout. You can
rename it to close_stdout_if_closing_later_could_fail(). :-)
There is no portability issue, because on those platforms for which
__fpending is not yet ported, it will return 1, which is on the safe side.
Bruno
- [Bug-gnulib] closeout doesn't always close: which is better: always or never?, Jim Meyering, 2004/11/06
- Re: [Bug-gnulib] closeout doesn't always close: which is better: always or never?, Paul Eggert, 2004/11/06
- Re: [Bug-gnulib] closeout doesn't always close: which is better: always or never?,
Bruno Haible <=
- Re: [Bug-gnulib] closeout doesn't always close: which is better: always or never?, Jim Meyering, 2004/11/06
- Re: [Bug-gnulib] closeout doesn't always close: which is better: always or never?, Bruno Haible, 2004/11/06
- Re: [Bug-gnulib] closeout doesn't always close: which is better: always or never?, Jim Meyering, 2004/11/06
- [Bug-gnulib] *now*, close_stdout always does, Jim Meyering, 2004/11/10
- Re: [Bug-gnulib] *now*, close_stdout always does, Jim Meyering, 2004/11/13