[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why does close_stdout close stdout and stderr?
From: |
Assaf Gordon |
Subject: |
Re: Why does close_stdout close stdout and stderr? |
Date: |
Tue, 7 May 2019 03:49:22 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
I should've added:
On 2019-05-07 3:44 a.m., Assaf Gordon wrote:
I'm attaching a sample test program to illustrate some points.
The program writes to stdout/stderr then optionally calls
fclose/fflush/fsync.
Note the following:
The attached program also calls "ferror" on the stream,
but it does not signal an error in those listed cases.
Also note that the output of the program is purposefully small ("Hello\n").
If it was large enough to fill libc's buffer and cause a write(2),
then the errors would be returned to the application.
But if the output is small - such errors are lost.
-assaf
- Re: Why does close_stdout close stdout and stderr?, (continued)
- Re: Why does close_stdout close stdout and stderr?, Bruno Haible, 2019/05/25
- Re: Why does close_stdout close stdout and stderr?, Florian Weimer, 2019/05/27
- Re: Why does close_stdout close stdout and stderr?, Bruno Haible, 2019/05/25
- Re: Why does close_stdout close stdout and stderr?, Paul Eggert, 2019/05/25
- Re: Why does close_stdout close stdout and stderr?, Florian Weimer, 2019/05/27
- Re: Why does close_stdout close stdout and stderr?, Bruno Haible, 2019/05/27
Re: Why does close_stdout close stdout and stderr?, Paul Eggert, 2019/05/06
Re: Why does close_stdout close stdout and stderr?, Bruno Haible, 2019/05/06
- Re: Why does close_stdout close stdout and stderr?, Assaf Gordon, 2019/05/07
- Re: Why does close_stdout close stdout and stderr?,
Assaf Gordon <=
- Re: Why does close_stdout close stdout and stderr?, Bruno Haible, 2019/05/07
- Re: Why does close_stdout close stdout and stderr?, NeilBrown, 2019/05/07
- Re: Why does close_stdout close stdout and stderr?, Florian Weimer, 2019/05/08
- Re: Why does close_stdout close stdout and stderr?, Paul Eggert, 2019/05/09
- Re: Why does close_stdout close stdout and stderr?, Florian Weimer, 2019/05/09
- Re: Why does close_stdout close stdout and stderr?, NeilBrown, 2019/05/09