Jim Meyering wrote: > How about using { ...; } instead? > > d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` > \ > > That should do the same without the cost of a sub-shell.
Yes, this works too. Applied, with this ChangeLog entry: 2011-12-04 Bruno Haible <br...@clisp.org> Jim Meyering <meyer...@redhat.com> tests: Avoid spurious error message on platforms without mktemp program. * tests/init.sh (mktempd_): Run mktemp in a subcommand. -- In memoriam Fred Hampton <http://en.wikipedia.org/wiki/Fred_Hampton>