On 09/08/2010 07:20 AM, Jim Meyering wrote:
grep portability testing has exposed some unwarranted test failures.
Using a better SHELL was the quick work-around.
Fixing init.sh is the real fix:

From d79a9c27419cc4679620b9283351566ba6085cd2 Mon Sep 17 00:00:00 2001
From: Jim Meyering<[email protected]>
Date: Wed, 8 Sep 2010 15:18:46 +0200
Subject: [PATCH] init.sh: disqualify shells for which set -x corrupts stderr

I'm a little worried that this patch might exclude all shells on a given platform. For example, on IRIX 5.3:

$ /bin/sh -c '(exec 3>&1; set -x; P=1 true 2>&3) 2>/dev/null'
P=1
$ /bin/ksh -c '(exec 3>&1; set -x; P=1 true 2>&3) 2>/dev/null'
+ P=1
$ bash -c '(exec 3>&1; set -x; P=1 true 2>&3) 2>/dev/null'
$

If bash is manually installed, then things are okay. But all existing shells on a bare-bones installation output trace information.

Maybe a compromise is to test that if there is output, is it at least proceeded by PS4 (in which case it can be filtered), so as not to outright rejecting /bin/ksh, but still exclude /bin/sh as unfilterable?

--
Eric Blake   [email protected]    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Reply via email to