X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Ftest%2Ftest-tmpfiles.c;h=565f0f8b40f391d164416ba31c86c72862086d36;hp=f25a0dca525b96d30b75eb35e33a59200bf07921;hb=8328d8c63332319965fd288634a9a709e9b96425;hpb=65b3903ff576488eaabb51d3c4fbf9c73d867d7c diff --git a/src/test/test-tmpfiles.c b/src/test/test-tmpfiles.c index f25a0dca5..565f0f8b4 100644 --- a/src/test/test-tmpfiles.c +++ b/src/test/test-tmpfiles.c @@ -34,13 +34,13 @@ int main(int argc, char** argv) { _cleanup_close_ int fd, fd2; _cleanup_free_ char *cmd, *cmd2; - fd = open_tmpfile(p, O_RDWR); + fd = open_tmpfile(p, O_RDWR|O_CLOEXEC); assert(fd >= 0); assert_se(asprintf(&cmd, "ls -l /proc/"PID_FMT"/fd/%d", getpid(), fd) > 0); system(cmd); - fd2 = mkostemp_safe(pattern, O_RDWR); + fd2 = mkostemp_safe(pattern, O_RDWR|O_CLOEXEC); assert(fd >= 0); assert_se(unlink(pattern) == 0);