summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/mktemp.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/stdlib/mktemp.3')
-rw-r--r--src/lib/libc/stdlib/mktemp.342
1 files changed, 21 insertions, 21 deletions
diff --git a/src/lib/libc/stdlib/mktemp.3 b/src/lib/libc/stdlib/mktemp.3
index 83b7c9eb30..a967358164 100644
--- a/src/lib/libc/stdlib/mktemp.3
+++ b/src/lib/libc/stdlib/mktemp.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: mktemp.3,v 1.2 2024/03/01 21:30:40 millert Exp $ 1.\" $OpenBSD: mktemp.3,v 1.4 2025/08/04 14:11:37 schwarze Exp $
2.\" 2.\"
3.\" Copyright (c) 1989, 1991, 1993 3.\" Copyright (c) 1989, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
@@ -27,17 +27,17 @@
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE. 28.\" SUCH DAMAGE.
29.\" 29.\"
30.Dd $Mdocdate: March 1 2024 $ 30.Dd $Mdocdate: August 4 2025 $
31.Dt MKTEMP 3 31.Dt MKTEMP 3
32.Os 32.Os
33.Sh NAME 33.Sh NAME
34.Nm mktemp , 34.Nm mktemp ,
35.Nm mkstemp , 35.Nm mkstemp ,
36.Nm mkostemp ,
37.Nm mkstemps , 36.Nm mkstemps ,
38.Nm mkostemps ,
39.Nm mkdtemp , 37.Nm mkdtemp ,
40.Nm mkdtemps 38.Nm mkdtemps ,
39.Nm mkostemp ,
40.Nm mkostemps
41.Nd make temporary file name (unique) 41.Nd make temporary file name (unique)
42.Sh SYNOPSIS 42.Sh SYNOPSIS
43.In stdlib.h 43.In stdlib.h
@@ -119,6 +119,8 @@ system call:
119Append on each write. 119Append on each write.
120.It Dv O_CLOEXEC 120.It Dv O_CLOEXEC
121Set the close-on-exec flag on the new file descriptor. 121Set the close-on-exec flag on the new file descriptor.
122.It Dv O_CLOFORK
123Set the close-on-fork flag on the new file descriptor.
122.It Dv O_SYNC 124.It Dv O_SYNC
123Perform synchronous I/O operations. 125Perform synchronous I/O operations.
124.El 126.El
@@ -163,8 +165,8 @@ functions return a pointer to the template on success and
163on failure. 165on failure.
164The 166The
165.Fn mkstemp , 167.Fn mkstemp ,
166.Fn mkostemp ,
167.Fn mkstemps , 168.Fn mkstemps ,
169.Fn mkostemp ,
168and 170and
169.Fn mkostemps 171.Fn mkostemps
170functions return \-1 if no suitable file could be created. 172functions return \-1 if no suitable file could be created.
@@ -253,9 +255,9 @@ of
253The 255The
254.Fn mktemp , 256.Fn mktemp ,
255.Fn mkstemp , 257.Fn mkstemp ,
256.Fn mkostemp , 258.Fn mkdtemp ,
257and 259and
258.Fn mkdtemp 260.Fn mkostemp
259functions may set 261functions may set
260.Va errno 262.Va errno
261to one of the following values: 263to one of the following values:
@@ -318,8 +320,8 @@ function.
318.Pp 320.Pp
319The 321The
320.Fn mkstemp , 322.Fn mkstemp ,
321.Fn mkostemp ,
322.Fn mkstemps , 323.Fn mkstemps ,
324.Fn mkostemp ,
323and 325and
324.Fn mkostemps 326.Fn mkostemps
325functions may also set 327functions may also set
@@ -345,18 +347,16 @@ function.
345.Xr tmpnam 3 347.Xr tmpnam 3
346.Sh STANDARDS 348.Sh STANDARDS
347The 349The
348.Fn mkdtemp 350.Fn mkstemp ,
351.Fn mkdtemp ,
349and 352and
350.Fn mkstemp 353.Fn mkostemp
351functions conform to the 354functions conform to the
352.St -p1003.1-2008 355.St -p1003.1-2024
353specification. 356specification.
354The ability to specify more than six 357The ability to specify more than six
355.Em X Ns s 358.Em X Ns s
356is an extension to that standard. 359is an extension to that standard.
357The
358.Fn mkostemp
359function is expected to conform to a future revision of that standard.
360.Pp 360.Pp
361The 361The
362.Fn mktemp 362.Fn mktemp
@@ -368,9 +368,9 @@ it is no longer a part of the standard.
368.Pp 368.Pp
369The 369The
370.Fn mkstemps , 370.Fn mkstemps ,
371.Fn mkostemps , 371.Fn mkdtemps ,
372and 372and
373.Fn mkdtemps 373.Fn mkostemps
374functions are non-standard and should not be used if portability is required. 374functions are non-standard and should not be used if portability is required.
375.Sh HISTORY 375.Sh HISTORY
376A 376A
@@ -378,14 +378,14 @@ A
378function appeared in 378function appeared in
379.At v7 . 379.At v7 .
380The 380The
381.Fn mkdtemp
382function appeared in
383.Ox 2.2 .
384The
385.Fn mkstemp 381.Fn mkstemp
386function appeared in 382function appeared in
387.Bx 4.3 . 383.Bx 4.3 .
388The 384The
385.Fn mkdtemp
386function appeared in
387.Ox 2.2 .
388The
389.Fn mkstemps 389.Fn mkstemps
390function appeared in 390function appeared in
391.Ox 2.3 . 391.Ox 2.3 .