Commit b9ee041e authored by Natanael Copa's avatar Natanael Copa

improve tempdir creation

parent 17c8c0e3
......@@ -38,9 +38,9 @@ eecho() {
init_tmpdir() {
local omask=`umask`
local __tmpd="/tmp/$PROGRAM-${$}-`date +%s`"
local __tmpd="/tmp/$PROGRAM-${$}-`date +%s`-$RANDOM"
umask 077 || die "umask"
mkdir "$__tmpd" || exit 1
mkdir -p "$__tmpd" || exit 1
trap "rm -fr \"$__tmpd\"; exit" 0
umask $omask
eval "$1=\"$__tmpd\""
......
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