bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH]


From: alexandre.ferrieux
Subject: Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH]
Date: Sun, 9 Apr 2017 11:32:00 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111113 Thunderbird/8.0

On 09/04/2017 07:40, Eli Zaretskii wrote:
 Date: Sat, 8 Apr 2017 23:47:58 +0200
 From:<address@hidden>
 CC:<address@hidden>,<address@hidden>

 >>     0xC000014B   STATUS_PIPE_BROKEN
 >>
 >>   Do you really think "invalid handle" better conveys that meaning ?
 >
 >  Yes, because AFAIK STATUS_PIPE_BROKEN is a status returned by device
 >  drivers, not by programs.

 So, you'd draw a hard line between the two values 0xC0000008 and 0xC000014B ?

I'm drawing a line where the EXCEPTION_* values defined in winbase.h
header end.  All the other values are AFAIK never triggered by fatal
exceptions that cause abnormal program termination.

Yet the values live in the same namespace (in ntstatus.h) so are guaranteed no 
to collide.

Anybody looking 0xC000014B up with a header grep or a google search will land on 
"pipe broken".

On the contrary, if we stick to "invalid handle", they will mistakenly think that there is a serious error in the gawk core. Indeed, an invalid handle is either a random value that's never been a handle in the first place, or a formerly valid handle that the current process has purposefully forsaken with CloseHandle. In the case of EPIPE, at the instant when the Write fails, the handle is still valid; and if we're still to live for some time instead of immediately exiting, we even must Close it to avoid a leak. So, "invalid handle" is simply not applicable at all.

_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce 
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou 
falsifie. Merci.

This message and its attachments may contain confidential or privileged 
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete 
this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been 
modified, changed or falsified.
Thank you.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]