mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
mktemp.1: Document TMPDIR in ENVIRONMENT
While here, use Ev for TMPDIR consistently. MFC after: 3 days Event: EuroBSDCon 2025
This commit is contained in:
parent
d9f03a43f2
commit
6b164f1811
1 changed files with 10 additions and 2 deletions
|
|
@ -27,7 +27,7 @@
|
|||
.\"
|
||||
.\" From: $OpenBSD: mktemp.1,v 1.8 1998/03/19 06:13:37 millert Exp $
|
||||
.\"
|
||||
.Dd August 4, 2022
|
||||
.Dd September 27, 2025
|
||||
.Dt MKTEMP 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
|
@ -185,6 +185,13 @@ but still introduces a race condition.
|
|||
Use of this
|
||||
option is not encouraged.
|
||||
.El
|
||||
.Sh ENVIRONMENT
|
||||
.Bl -tag -width TMPDIR
|
||||
.It Ev TMPDIR
|
||||
The directory in which to store temporary files.
|
||||
Refer to
|
||||
.Xr environ 7 .
|
||||
.El
|
||||
.Sh EXIT STATUS
|
||||
.Ex -std
|
||||
.Sh EXAMPLES
|
||||
|
|
@ -200,7 +207,8 @@ TMPFILE=`mktemp /tmp/${tempfoo}.XXXXXXXXXX` || exit 1
|
|||
echo "program output" >> $TMPFILE
|
||||
.Ed
|
||||
.Pp
|
||||
To allow the use of $TMPDIR:
|
||||
To allow the use of
|
||||
.Ev TMPDIR :
|
||||
.Bd -literal -offset indent
|
||||
tempfoo=`basename $0`
|
||||
TMPFILE=`mktemp -t ${tempfoo}` || exit 1
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue