diff options
-rw-r--r-- | src/libs6/ftrig1_make.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs6/ftrig1_make.c b/src/libs6/ftrig1_make.c index 6a6ff11..04c8c73 100644 --- a/src/libs6/ftrig1_make.c +++ b/src/libs6/ftrig1_make.c @@ -2,6 +2,7 @@ #include <string.h> #include <stdio.h> +#include <fcntl.h> #include <skalibs/posixplz.h> #include <skalibs/tai.h> @@ -22,9 +23,8 @@ int ftrig1_make (ftrig1_t *f, char const *path) tmp[pathlen + 2 + FTRIG1_PREFIXLEN] = ':' ; if (!timestamp(tmp + pathlen + 3 + FTRIG1_PREFIXLEN)) return 0 ; memcpy(tmp + pathlen + FTRIG1_PREFIXLEN + 28, ":XXXXXX", 8) ; - ff.fd = mkptemp(tmp) ; + ff.fd = mkptemp2(tmp, O_NONBLOCK|O_CLOEXEC) ; if (ff.fd == -1) return 0 ; - if (ndelay_on(ff.fd) == -1) goto err1 ; ff.fdw = open_write(tmp) ; if (ff.fdw == -1) goto err1 ; if (!stralloc_ready(&ff.name, pathlen + FTRIG1_PREFIXLEN + 36)) goto err2 ; |