diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2012-03-05 20:29:00 +0100 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2012-03-05 20:29:00 +0100 |
commit | 35355fc1fcffbe859395e360c0a6a1463f137d63 (patch) | |
tree | 0d5ed221e64ca64303c2f88dcf68cc054ba5e8e6 /src/libstore/pathlocks.cc | |
parent | 7b22bec252a155514d811a8e2acc21562ac02bd4 (diff) |
Set the close-on-exec flag on file descriptors
Diffstat (limited to 'src/libstore/pathlocks.cc')
-rw-r--r-- | src/libstore/pathlocks.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/pathlocks.cc b/src/libstore/pathlocks.cc index 645f4cd67..b858ed238 100644 --- a/src/libstore/pathlocks.cc +++ b/src/libstore/pathlocks.cc @@ -20,6 +20,8 @@ int openLockFile(const Path & path, bool create) if (fd == -1 && (create || errno != ENOENT)) throw SysError(format("opening lock file `%1%'") % path); + closeOnExec(fd); + return fd.borrow(); } |