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 14:52:38 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111113 Thunderbird/8.0

On 09/04/2017 14:07, Eli Zaretskii wrote:
 Date: Sun, 9 Apr 2017 13:35:10 +0200
 From:<address@hidden>
 CC:<address@hidden>,<address@hidden>

 On 09/04/2017 13:04, Eli Zaretskii wrote:
 >>  >   How many of them will stop and not use Google ? Seriously ...
 >  Programs don't use Google.  They use values encoded in their source
 >  code.

 Aha, here is the mental process of the human writing that source code:

That source code has already been written.  It already runs in ported
programs, such as Guile.  It maps the exit code values returned by
Windows programs which terminated due to a fatal exception, to the
equivalent Posix signal, in order to present useful diagnostic to
their users.  For example, the diagnostic might say "Program gawk
was terminated by a SIGSEGV."

The mapping uses only the EXCEPTION_* exception codes which are
defined in winbase.h.  Those include EXCEPTION_INVALID_HANDLE, but do
not include STATUS_PIPE_BROKEN.

So if Gawk returns 0xC000014B, the programs in question will not be
able to interpret it in any useful way.

So you know in advance that all such programs necessarily have a finite switch..case based on known EXCEPTION_* values in winbase.h, and don't even have the obvious fallback:

        default: fprintf(stderr,"# Inknown exit status 0x%x\n", status);

I bet such precognition could be put to better use than software...

In any case, here's a precedent that can be found in a few clicks after 
googling for 0xC000014B.
As you can see, developers and/or users of that specific piece of software ( a flight simulator) were able to make sense of just the hexadecimal value (which was brought to their attention by a generic fallback as the above), and turn this knowledge into useful advice.

If, by contrast, you look at google results for 0xC0000008, you're in for a 
disappointment.



http://www.pilote-virtuel.com/img/members/81/AVSIM-CTD-Guide.pdf

HRESULT: 0xc000014B  error -- Mostly  occurs  in  networked  computers.  This  
is  a
Microsoft.net  error.  The  0xc000014B  is  a  "broken  pipe"  exception. A  
pipe  is  a
communication channel between two applications (such as FSX/P3D and an add-on 
program
like ASN or OPUS, or network). SimConnect offers add-ons the possibility to use 
pipes to
communication with FSX. A "broken pipe" is a situation where one of the pipes 
no longer
exists, while the other tries to communicate using the pipe. A typical scenario 
would be fsx
crashing  and then  ASN  or  OPUS tried to use the  pipe  (communications  
channel)  and the
“pipe” was broken.  The 014B exception would then occur.  Check your 
network setup or an
application that uses SimConnect and troubleshoot.


_________________________________________________________________________________________________________________________

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]