about summary refs log tree commit diff
path: root/src/libutil/hash.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-06-09T14·15+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-06-09T14·37+0200
commit202683a4fc148dc228de226e9980a3f27754b854 (patch)
treedd75cf8f873a913ac3baf222eb93981622407d5f /src/libutil/hash.cc
parent9bdd949cfdc9e49f1e01460a2a73215cac3ec904 (diff)
Use O_CLOEXEC in most places
Diffstat (limited to 'src/libutil/hash.cc')
-rw-r--r--src/libutil/hash.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/hash.cc b/src/libutil/hash.cc
index c17f1c4d5150..69ea95852c3f 100644
--- a/src/libutil/hash.cc
+++ b/src/libutil/hash.cc
@@ -254,7 +254,7 @@ Hash hashFile(HashType ht, const Path & path)
     Hash hash(ht);
     start(ht, ctx);
 
-    AutoCloseFD fd = open(path.c_str(), O_RDONLY);
+    AutoCloseFD fd = open(path.c_str(), O_RDONLY | O_CLOEXEC);
     if (fd == -1) throw SysError(format("opening file ‘%1%’") % path);
 
     unsigned char buf[8192];