summaryrefslogtreecommitdiff
path: root/src/udev/cdrom_id/cdrom_id.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-13 14:59:56 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-13 14:59:56 +0100
commitc8a202b7d47f9d6bba3100a208abdadfc383499e (patch)
treed19560cf0723f8e2305170881eb442b5ecb12b0d /src/udev/cdrom_id/cdrom_id.c
parent955d98c9c1104d469c2989dbfb58f58ee6fe9bdc (diff)
everywhere: always use O_CLOEXEC where it makes sense
Diffstat (limited to 'src/udev/cdrom_id/cdrom_id.c')
-rw-r--r--src/udev/cdrom_id/cdrom_id.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/udev/cdrom_id/cdrom_id.c
index 02a4d399e7..93467c2d35 100644
--- a/src/udev/cdrom_id/cdrom_id.c
+++ b/src/udev/cdrom_id/cdrom_id.c
@@ -930,7 +930,7 @@ int main(int argc, char *argv[])
for (cnt = 20; cnt > 0; cnt--) {
struct timespec duration;
- fd = open(node, O_RDONLY|O_NONBLOCK|(is_mounted(node) ? 0 : O_EXCL));
+ fd = open(node, O_RDONLY|O_NONBLOCK|O_CLOEXEC|(is_mounted(node) ? 0 : O_EXCL));
if (fd >= 0 || errno != EBUSY)
break;
duration.tv_sec = 0;