summaryrefslogtreecommitdiffstats
path: root/libebtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libebtc.c')
-rw-r--r--libebtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libebtc.c b/libebtc.c
index 2a9ab87..1b058ef 100644
--- a/libebtc.c
+++ b/libebtc.c
@@ -144,7 +144,7 @@ static int lock_file()
int fd, try = 0;
retry:
- fd = open(LOCKFILE, O_CREAT, 00600);
+ fd = open(LOCKFILE, O_CREAT|O_CLOEXEC, 00600);
if (fd < 0) {
if (try == 1 || mkdir(dirname(pathbuf), 00700))
return -2;