use safe tmpdir

This commit is contained in:
dugsong 1998-12-19 21:12:56 +00:00
parent 6e58b8b012
commit 4636ef9863

View File

@ -4,5 +4,16 @@
#
# dugsong@OpenBSD.org
exec y0y0y0/wpbin/xwp $*
TMPDIR=/tmp/wp-$$
export TMPDIR
if ! mkdir -m 700 $TMPDIR ; then
echo "Error: $TMPDIR already exists, looks like:"
ls -alF $TMPDIR
exit 1
fi
trap 'rm -rf $TMPDIR ; exit 1' 0 1 2 3 13 15
y0y0y0/wpbin/xwp $*