everywhere: always use O_CLOEXEC where it makes sense

This commit is contained in:
Lennart Poettering
2014-02-13 14:59:56 +01:00
parent 955d98c9c1
commit c8a202b7d4
14 changed files with 19 additions and 20 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ ssize_t sendfile_full(int out_fd, const char *fn) {
assert(out_fd > 0);
assert(fn);
f = fopen(fn, "r");
f = fopen(fn, "re");
if (!f)
return -errno;
+1 -1
View File
@@ -174,7 +174,7 @@ static int hibernation_partition_size(size_t *size, size_t *used) {
assert(size);
assert(used);
f = fopen("/proc/swaps", "r");
f = fopen("/proc/swaps", "re");
if (!f) {
log_full(errno == ENOENT ? LOG_DEBUG : LOG_WARNING,
"Failed to retrieve open /proc/swaps: %m");