I frequently use << within shell scripts to read in commands and exec them. This has the habit of creating temporary files in the /tmp directory. I have some occasions where the script may not exit properly and leave strangling /tmp/sh* files around. Problem is when another user trys to run a script at a later time, pids may duplicate and the creation of the /tmp/sh* file fails because it already exists and is owned by a different user.
I've been accustomed to using:
TMPDIR=/another/dir;export TMPDIR
to have the shell use a specified tmp dir, but under SCO it seems the use of /tmp is hardcoded in /bin/sh and /bin/ksh ?
Can anyone verify/deny this or point me to another method to have the shell use a tmp directory of my choosing?