chiark / gitweb /
everywhere: always use O_CLOEXEC where it makes sense
[elogind.git] / src / udev / ata_id / ata_id.c
index 649890618e3135b192da48aa9f2bf1904a781029..f84281dd1a2480faab65c7cfbc8d8204fabdb2b1 100644 (file)
@@ -468,7 +468,7 @@ int main(int argc, char *argv[])
                 goto exit;
         }
 
-        fd = open(node, O_RDONLY|O_NONBLOCK);
+        fd = open(node, O_RDONLY|O_NONBLOCK|O_CLOEXEC);
         if (fd < 0) {
                 log_error("unable to open '%s'", node);
                 rc = 1;