tests: Avoid spurious error message on platforms without mktemp program.
authorBruno Haible <bruno@clisp.org>
Mon, 5 Dec 2011 01:58:55 +0000 (02:58 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 5 Dec 2011 01:58:55 +0000 (02:58 +0100)
* tests/init.sh (mktempd_): Run mktemp in a subcommand.

ChangeLog
tests/init.sh

index 0bd5d06..0cfb578 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
 2011-12-04  Bruno Haible  <bruno@clisp.org>
+           Jim Meyering  <meyering@redhat.com>
+
+       tests: Avoid spurious error message on platforms without mktemp program.
+       * tests/init.sh (mktempd_): Run mktemp in a subcommand.
+
+2011-12-04  Bruno Haible  <bruno@clisp.org>
 
        sethostname: Fix documentation.
        * doc/glibc-functions/sethostname.texi: Move the Solaris problem to the
index e2f6119..19c0cf4 100644 (file)
@@ -521,7 +521,7 @@ mktempd_ ()
   esac
 
   # First, try to use mktemp.
-  d=`unset TMPDIR; 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.