From 85a7bc88636c4a46a80bb6c42be258f2efc6b20b Mon Sep 17 00:00:00 2001 From: bapt Date: Thu, 27 Dec 2012 20:24:44 +0000 Subject: Add O_CLOEXEC to flopen Requested by: jilles --- lib/libutil/gr_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libutil/gr_util.c') diff --git a/lib/libutil/gr_util.c b/lib/libutil/gr_util.c index 2f87bd1..4583257 100644 --- a/lib/libutil/gr_util.c +++ b/lib/libutil/gr_util.c @@ -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"); -- cgit v1.1