From 584308368830f70c1b7b4b129d82457f7a9ca24f Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 6 Apr 2010 19:24:57 +0200 Subject: [PATCH] init.sh: simply unset TMPDIR rather than risking env -i * tests/init.sh (mktempd_): Using env -i is rather harsh, and although it probably works fine on all Unix-based systems, some systems (Cygwin?) cannot tolerate a totally cleared environment. Suggestion from Eric Blake. 2010-04-06 Jim Meyering --- ChangeLog | 8 ++++++++ tests/init.sh | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 60fb41354..59cec392f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2010-04-06 Jim Meyering + init.sh: simply unset TMPDIR rather than risking env -i + * tests/init.sh (mktempd_): Using env -i is rather harsh, and + although it probably works fine on all Unix-based systems, some + systems (Cygwin?) cannot tolerate a totally cleared environment. + Suggestion from Eric Blake. + +2010-04-06 Jim Meyering + init.sh: portability fix: use env's POSIX-specified -i option not -u * tests/init.sh (mktempd_): Use env -i and set PATH explicitly rather than unportable env -u. Solaris 5.11's env lacks support for -u. diff --git a/tests/init.sh b/tests/init.sh index 9b6512922..abfa3b3c3 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -306,7 +306,7 @@ mktempd_() fail=0 # First, try to use mktemp. - d=`env -i PATH="$PATH" mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \ + d=`unset TMPDIR; mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \ || fail=1 # The resulting name must be in the specified directory. -- 2.11.0