pipefail doesn't work on NetBSD or FreeBSD

Gary E. Miller gem at rellim.com
Fri Nov 30 22:11:48 UTC 2018


Yo Hal!

On Thu, 29 Nov 2018 22:08:12 -0800
Hal Murray <hmurray at megapathdsl.net> wrote:

> >> ./tests/option-tester.sh: 98: ./tests/option-tester.sh: PYTHONPATH:
> >> parameter not set  
> 
> > Weird.  Stupid shell.  Just test that PYTHONPATH exists before
> > trying to echo it.   
> 
> Actually, there is already a test.  That's where it is dying.
> 
> I assume we can unset whatever it is called.

Ditto.

> > Good.  Then this may be the workaround for pipefal:
> > https://stackoverflow.com/questions/13084352/how-to-implement-set-o-pipefai=
> > l-in-a-posix-way-almost-done-expert-help-nee   
> 
> We have a policy of no hacks around POSIX bugs.

It ain't a bug, its a feature.  What the POSIX shell is doing is well
documented as expected behavior.

> The referenced we page looks pretty ugly to me.

Not proposed as an ultimate solution.  But it is a common one used
by many.  It does show a way around the issue.

> How about adding a comment to the code saying "If this doesn't work,
> you have a buggy sh and you have to check the results by hand"

Once again:  Not a bug, a feature.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20181130/cb36a13f/attachment.bin>


More information about the devel mailing list