|
From: | Eric Blake |
Subject: | Re: [PATCH] init.sh: disqualify shells for which set -x corrupts stderr |
Date: | Wed, 08 Sep 2010 08:32:04 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2 |
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 2001From: Jim Meyering<address@hidden> 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 address@hidden +1-801-349-2682 Libvirt virtualization library http://libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |