diff --git a/editors/wordperfect/files/xwp b/editors/wordperfect/files/xwp index b5ac6817f20..5b588c29d72 100755 --- a/editors/wordperfect/files/xwp +++ b/editors/wordperfect/files/xwp @@ -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 $*