]> git.cameronkatri.com Git - pw-darwin.git/blobdiff - libutil/gr_util.c
Add O_CLOEXEC to flopen
[pw-darwin.git] / libutil / gr_util.c
index 2f87bd1c056306574234a9e0a3595a1b8787c11d..4583257d360f9a053b67f00a54ec10cc003f4497 100644 (file)
@@ -101,7 +101,7 @@ gr_lock(void)
        for (;;) {
                struct stat st;
 
-               lockfd = flopen(group_file, O_RDONLY|O_NONBLOCK, 0);
+               lockfd = flopen(group_file, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0);
                if (lockfd == -1) {
                        if (errno == EWOULDBLOCK) {
                                errx(1, "the group file is busy");