Commit 1ef7a0c2 by dlezcano

Add close on exec flag

parent 1638d310
......@@ -43,6 +43,8 @@ int lxc_get_lock(const char *name)
goto out;
}
fcntl(fd, F_SETFD, FD_CLOEXEC);
if (flock(fd, LOCK_EX|LOCK_NB)) {
ret = errno == EWOULDBLOCK ? 0 : -errno;
close(fd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment