chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
everywhere: always use O_CLOEXEC where it makes sense
[elogind.git]
/
src
/
udev
/
cdrom_id
/
cdrom_id.c
diff --git
a/src/udev/cdrom_id/cdrom_id.c
b/src/udev/cdrom_id/cdrom_id.c
index 02a4d399e731ab6aa3b046666e33bcb2bd4c356a..93467c2d35b0b95734570536dd8cb996f9ed8e85 100644
(file)
--- 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;
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;
if (fd >= 0 || errno != EBUSY)
break;
duration.tv_sec = 0;