summaryrefslogtreecommitdiff
path: root/libudev/libudev-queue.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2010-05-14 14:52:18 +0200
committerKay Sievers <kay.sievers@vrfy.org>2010-05-14 14:52:18 +0200
commit0c5c48040ac0f4c97f73fb3ac5493cc2d84a963b (patch)
tree314ce681dab98eedf25f7b12c87a0e0575143bca /libudev/libudev-queue.c
parent12d73e9587a8d9a3ab6415183e4e6762315aa85a (diff)
libudev: add O_CLOEXEC
Diffstat (limited to 'libudev/libudev-queue.c')
-rw-r--r--libudev/libudev-queue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libudev/libudev-queue.c b/libudev/libudev-queue.c
index 5a4a3dc095..f3cb5ab498 100644
--- a/libudev/libudev-queue.c
+++ b/libudev/libudev-queue.c
@@ -131,7 +131,7 @@ unsigned long long int udev_get_kernel_seqnum(struct udev *udev)
ssize_t len;
util_strscpyl(filename, sizeof(filename), udev_get_sys_path(udev), "/kernel/uevent_seqnum", NULL);
- fd = open(filename, O_RDONLY);
+ fd = open(filename, O_RDONLY|O_CLOEXEC);
if (fd < 0)
return 0;
len = read(fd, buf, sizeof(buf));
@@ -215,7 +215,7 @@ static FILE *open_queue_file(struct udev_queue *udev_queue, unsigned long long i
FILE *queue_file;
util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev_queue->udev), "/.udev/queue.bin", NULL);
- queue_file = fopen(filename, "r");
+ queue_file = fopen(filename, "re");
if (queue_file == NULL)
return NULL;