tree-wide: Remove O_CLOEXEC from fdopen

fdopen doesn't accept "e", it's ignored. Let's not mislead people into
believing that it actually sets O_CLOEXEC.

From `man 3 fdopen`:

> e (since glibc 2.7):
> Open the file with the O_CLOEXEC flag. See open(2) for more information. This flag is ignored for fdopen()

As mentioned by @jlebon in #11131.
This commit is contained in:
Chris Down
2018-12-12 20:47:40 +01:00
committed by Lennart Poettering
parent 9be3c60570
commit e92aaed30e
17 changed files with 22 additions and 22 deletions
+1 -1
View File
@@ -156,7 +156,7 @@ int write_string_file_ts(
goto fail;
}
f = fdopen(fd, "we");
f = fdopen(fd, "w");
if (!f) {
r = -errno;
safe_close(fd);
+1 -1
View File
@@ -36,7 +36,7 @@ int fopen_temporary(const char *path, FILE **_f, char **_temp_path) {
return -errno;
}
f = fdopen(fd, "we");
f = fdopen(fd, "w");
if (!f) {
unlink_noerrno(t);
free(t);