vim: ft=help:tw=78:ts=8:norl:nolist:nonu:noml:

If you make temporary files, check the TMPDIR environment variable; if that
variable is defined, use the specified directory instead of /tmp.

In addition, be aware that there is a possible security problem when creating
temporary files in world-writable directories. In C, you can avoid this
problem by creating temporary files in this manner:

```c
fd = open (filename, O_WRONLY | O_CREAT | O_EXCL, 0600);
```

or by using the mkstemps function from Gnulib (see mkstemps in Gnulib).

In bash, use set -C (long name noclobber) to avoid this problem. In addition,
the mktemp utility is a more general solution for creating temporary files
from shell scripts (see mktemp invocation in GNU Coreutils).
