X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=util.cpp;h=10e469df90c0a97c435c1eb405adb6ee5d9b7f7b;hb=6d34c5b6d8e5bec5d1421eadc103f38d206f34f1;hp=a85de446a87f9451610f90c401f716e2fab86e5e;hpb=d34b94a858c08d64eddfb9c115719fd9129be933;p=cubemap diff --git a/util.cpp b/util.cpp index a85de44..10e469d 100644 --- a/util.cpp +++ b/util.cpp @@ -18,7 +18,7 @@ using namespace std; int make_tempfile(const string &contents) { - int fd = open("/tmp", O_RDWR | O_TMPFILE, 0600); + int fd = open("/tmp", O_RDWR | O_TMPFILE | O_CLOEXEC, 0600); if (fd == -1) { char filename[] = "/tmp/cubemap.XXXXXX"; mode_t old_umask = umask(077);