bug-gzip
[Top][All Lists]
Advanced

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

bug#29266: gzip-1.8.41 test results: help-version on HP-UX


From: Jim Meyering
Subject: bug#29266: gzip-1.8.41 test results: help-version on HP-UX
Date: Mon, 13 Nov 2017 07:34:47 -0800

On Sun, Nov 12, 2017 at 11:53 PM, Paul Eggert <address@hidden> wrote:
> Bruno Haible wrote:
>>
>> ! # Produce output and exit with code 1 if there is a write error.
>> ! # Use 'exec echo', not plain 'echo', because the 'echo' built-in in
>> ! # HP-UX /bin/sh does not check for write errors.
>> ! # Use '|| exit 1', because the 'echo' program on HP-UX exits with
>> ! # code 2 in case of a write error, but we want code 1.
>> ! --help)    (exec echo "$usage") || exit 1; exit 0;;
>> ! --version) (exec echo "$version") || exit 1; exit 0;;
>
>
> Thanks for the patch. I don't think we need worry about the first problem,
> since gzip assumes a working POSIX shell and the first problem is a failure
> to conform to POSIX. We can ask builders on HP-UX to work around the problem
> by configuring with SHELL=/bin/bash, or with some other POSIX-compatible
> shell.
>
> The second problem is indeed a bug in gzip, since it shouldn't assume that
> echo exits with status 1 on failure (it could be some other positive
> status).
>
> I notice that some gzip scripts already fix that bug, and some other scripts
> do not fix it. Also, while we're at it, scripts should use printf instead of
> echo if the strings might contain backslash (at least in theory; admittedly
> a backslash in a version number would be pretty weird). I looked for these
> problems in all the scripts and installed the attached to fix what I found.

Nice. Thanks, Paul.
I've pushed this additional fix:

Attachment: zless-znew-exit.diff
Description: Text document


reply via email to

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