diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-07-01 19:51:47 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-07-01 19:52:44 -0700 |
commit | 1188465112a1a3c6acce9d370d448df70fd4fa4d (patch) | |
tree | 8c6c70f6553d965de56528379dfdf4548d965aa7 /x11perfcomp.in | |
parent | 4af24b2f5b3f8f2c20271ae323b6fa528b9b2127 (diff) |
x11perfcomp should use mktemp instead of pid for tmp directory
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'x11perfcomp.in')
-rw-r--r-- | x11perfcomp.in | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/x11perfcomp.in b/x11perfcomp.in index a541ddc..6956cf2 100644 --- a/x11perfcomp.in +++ b/x11perfcomp.in @@ -23,10 +23,17 @@ PATH="@x11perfcompdir@:/bin:/usr/bin:$PATH" export PATH +MKTEMP="@MKTEMP@" + set -e -tmp=${TMPDIR-/tmp}/rates.$$ +if [ "x$MKTEMP" != "x" ] && [ -x "$MKTEMP" ] ; then + tmp=`$MKTEMP -p /tmp -d rates.XXXXXX` + if [ "x$tmp" = "x" ]; then exit 1 ; fi +else + tmp=${TMPDIR-/tmp}/rates.$$ + mkdir $tmp || exit 1 +fi trap "rm -rf $tmp" 0 1 2 15 -mkdir $tmp || exit 1 mkdir $tmp/rates ratio= allfiles= |