diff options
| author | Mosder <git@mosder.eu> | 2026-09-17 15:51:23 +0200 |
|---|---|---|
| committer | Mosder <git@mosder.eu> | 2026-09-17 15:51:23 +0200 |
| commit | 5a7dcb86485f050aeeb77eef3313a6b92a2adde4 (patch) | |
| tree | 8da7de37d80b36f054bfc6d5dba284dda609c435 /src/safe.c | |
| parent | de163fe7ee64e63d36dd581db16c776831cbead0 (diff) | |
feat: changed output tests and suppression to use file descriptors for more portability
Diffstat (limited to 'src/safe.c')
| -rw-r--r-- | src/safe.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -88,3 +88,11 @@ int mos_safe_pipe_fn(int fd[2], MosSafeErrInfo info) { ERR_MESS("failed to pipe"); exit(EXIT_FAILURE); } + +int mos_safe_mkstemp_fn(char *path, MosSafeErrInfo info) { + int fd = mkstemp(path); + if (fd != -1) + return fd; + ERR_MESS("failed to make temporary file"); + exit(EXIT_FAILURE); +} |
