summaryrefslogtreecommitdiff
path: root/src/libs6
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-12-10 10:04:57 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-12-10 10:04:57 +0000
commitae33cbb87a1109b718a535c7587433662dc98071 (patch)
tree7148dd200a4765232f94a6f5680a7cf558debd8c /src/libs6
parentdd4afee4a8ea8c44126c44b31c6f1a36582d0964 (diff)
downloads6-ae33cbb87a1109b718a535c7587433662dc98071.tar.xz
Use mkptemp2
Diffstat (limited to 'src/libs6')
-rw-r--r--src/libs6/ftrig1_make.c4
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 ;