X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=stats.cpp;fp=stats.cpp;h=6685a2e77ea077a0ddb367eb0772859191e2b2b2;hp=955f2e9450ebb6fc7baf73e188fc6eddf372fa62;hb=6d34c5b6d8e5bec5d1421eadc103f38d206f34f1;hpb=d34b94a858c08d64eddfb9c115719fd9129be933 diff --git a/stats.cpp b/stats.cpp index 955f2e9..6685a2e 100644 --- a/stats.cpp +++ b/stats.cpp @@ -41,7 +41,7 @@ void StatsThread::do_work() // Open a new, temporary file. filename = strdup((stats_file + ".new.XXXXXX").c_str()); - fd = mkostemp(filename, O_WRONLY); + fd = mkostemp(filename, O_WRONLY | O_CLOEXEC); if (fd == -1) { log_perror(filename); free(filename);