diff options
Diffstat (limited to 'src/lib/libc')
| -rw-r--r-- | src/lib/libc/stdlib/mkstemp.c | 5 | ||||
| -rw-r--r-- | src/lib/libc/stdlib/mktemp.3 | 14 |
2 files changed, 10 insertions, 9 deletions
diff --git a/src/lib/libc/stdlib/mkstemp.c b/src/lib/libc/stdlib/mkstemp.c index 75a9d27d1a..760575005f 100644 --- a/src/lib/libc/stdlib/mkstemp.c +++ b/src/lib/libc/stdlib/mkstemp.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: mkstemp.c,v 1.1 2024/01/19 19:45:02 millert Exp $ */ | 1 | /* $OpenBSD: mkstemp.c,v 1.2 2025/08/04 04:59:31 guenther Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2024 Todd C. Miller | 3 | * Copyright (c) 2024 Todd C. Miller |
| 4 | * | 4 | * |
| @@ -20,7 +20,8 @@ | |||
| 20 | #include <fcntl.h> | 20 | #include <fcntl.h> |
| 21 | #include <stdlib.h> | 21 | #include <stdlib.h> |
| 22 | 22 | ||
| 23 | #define MKOSTEMP_FLAGS (O_APPEND | O_CLOEXEC | O_DSYNC | O_RSYNC | O_SYNC) | 23 | #define MKOSTEMP_FLAGS \ |
| 24 | (O_APPEND | O_CLOEXEC | O_CLOFORK | O_DSYNC | O_RSYNC | O_SYNC) | ||
| 24 | 25 | ||
| 25 | static int | 26 | static int |
| 26 | mkstemp_cb(const char *path, int flags) | 27 | mkstemp_cb(const char *path, int flags) |
diff --git a/src/lib/libc/stdlib/mktemp.3 b/src/lib/libc/stdlib/mktemp.3 index 83b7c9eb30..e57ac77717 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.3 2025/08/04 04:59:31 guenther 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,7 +27,7 @@ | |||
| 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 |
| @@ -119,6 +119,8 @@ system call: | |||
| 119 | Append on each write. | 119 | Append on each write. |
| 120 | .It Dv O_CLOEXEC | 120 | .It Dv O_CLOEXEC |
| 121 | Set the close-on-exec flag on the new file descriptor. | 121 | Set the close-on-exec flag on the new file descriptor. |
| 122 | .It Dv O_CLOFORK | ||
| 123 | Set the close-on-fork flag on the new file descriptor. | ||
| 122 | .It Dv O_SYNC | 124 | .It Dv O_SYNC |
| 123 | Perform synchronous I/O operations. | 125 | Perform synchronous I/O operations. |
| 124 | .El | 126 | .El |
| @@ -345,18 +347,16 @@ function. | |||
| 345 | .Xr tmpnam 3 | 347 | .Xr tmpnam 3 |
| 346 | .Sh STANDARDS | 348 | .Sh STANDARDS |
| 347 | The | 349 | The |
| 348 | .Fn mkdtemp | 350 | .Fn mkdtemp , |
| 351 | .Fn mkostemp , | ||
| 349 | and | 352 | and |
| 350 | .Fn mkstemp | 353 | .Fn mkstemp |
| 351 | functions conform to the | 354 | functions conform to the |
| 352 | .St -p1003.1-2008 | 355 | .St -p1003.1-2024 |
| 353 | specification. | 356 | specification. |
| 354 | The ability to specify more than six | 357 | The ability to specify more than six |
| 355 | .Em X Ns s | 358 | .Em X Ns s |
| 356 | is an extension to that standard. | 359 | is an extension to that standard. |
| 357 | The | ||
| 358 | .Fn mkostemp | ||
| 359 | function is expected to conform to a future revision of that standard. | ||
| 360 | .Pp | 360 | .Pp |
| 361 | The | 361 | The |
| 362 | .Fn mktemp | 362 | .Fn mktemp |
