[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] init.sh: portability fix: use env's POSIX-specified -i optio
From: |
Eric Blake |
Subject: |
Re: [PATCH] init.sh: portability fix: use env's POSIX-specified -i option not -u |
Date: |
Tue, 06 Apr 2010 09:43:03 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b1 Thunderbird/3.0.4 |
On 04/06/2010 09:36 AM, Jim Meyering wrote:
> FYI,
> I noticed unnecessary mktemp simulation in test logs on Solaris 5.11.
> This fixes it:
>
> # First, try to use mktemp.
> - d=`env -u TMPDIR mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \
> + d=`env -i PATH="$PATH" mktemp -d -t -p "$destdir_" "$template_"
> 2>/dev/null` \
Even 'env -i' is risky, since you are removing other possibly-important
variables, like POSIXLY_CORRECT. Isn't it better to just do:
d=`unset TMPDIR; mktemp -d ...`
and bypass env altogether?
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature