Commit e952a127 authored by Stefan Metzmacher's avatar Stefan Metzmacher Committed by Andrew Bartlett

selftest/gdb_*: make use of 'mktemp'

Signed-off-by: default avatarStefan Metzmacher <metze@samba.org>
Reviewed-by: default avatarAndrew Bartlett <abartlet@samba.org>
Reviewed-by: default avatarGarming Sam <garming@catalyst.net.nz>
parent 446851c8
......@@ -90,8 +90,16 @@ test x"${need_binary}" = x"yes" && {
}
}
BATCHFILE_PRE=/tmp/gdb_backtrace_pre.$$
BATCHFILE_MAIN=/tmp/gdb_backtrace_main.$$
BATCHFILE_PRE=`mktemp --tmpdir gdb_backtrace_pre.XXXXXXXXXX`
test -n "${BATCHFILE_PRE}" || {
echo "mktemp doesn't work" 1>&2
exit 1
}
BATCHFILE_MAIN=`mktemp --tmpdir gdb_backtrace_main.XXXXXXXXXX`
test -n "${BATCHFILE_MAIN}" || {
echo "mktemp doesn't work" 1>&2
exit 1
}
case "${DB}" in
ladebug)
cat << EOF > ${BATCHFILE_PRE}
......
......@@ -4,11 +4,12 @@ ENV="$1"
shift 1
if test -z "$TMPDIR"; then
TMPDIR="/tmp"
fi
TMPFILE=`mktemp --tmpdir gdb_run.XXXXXXXXXX`
test -n "${TMPFILE}" || {
echo "mktemp doesn't work" 1>&2
exit 1
}
TMPFILE=$TMPDIR/gdb_run.$$
cat << EOF > $TMPFILE
run
bt
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment