|
From: | FERRIEUX Alexandre - IMT/OLN |
Subject: | Re: [bug-gawk] Behavior of fflush with SIGPIPE on stdout [PATCH] |
Date: | Sun, 26 Mar 2017 16:39:52 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111113 Thunderbird/8.0 |
On 26/03/2017 16:29, Eli Zaretskii wrote:
If you allude to MS-Windows, then the exit status there is a full 32-bit word, certainly not narrower than on a typical Unix. To some extent, it's richer than the Unix status, because it provides the fatal exception which caused the program to exit abnormally, and exceptions are more granular than Unix signals.
Then by all means, add an ifdef branch to use that bandwidth appropriately on Windows too !
This isn't about the width of the exit status, this is about its value, and about the importance (or lack thereof) of a particular value produced when Gawk exited due to a certain errno.Is that against portability ?The way you want it? yes, because I cannot write a portable Awk script without system dependencies.
No, not the Awk script but its caller. And the caller (which typically has fewer portability constraints than Awk) may still be written in a portable manner by restricting the test to "!=0", which is the consensual contract.
In other words: - those who currently argue for a strict exit(1), will always be able to write portable callers with !=0 - those who need a finer grain, will be able to use it What harm in satisfying everybody ?
[Prev in Thread] | Current Thread | [Next in Thread] |