diff options
author | Chris Down <chris@chrisdown.name> | 2018-12-12 14:58:46 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-12-12 20:47:40 +0100 |
commit | e92aaed30e0b5750e5633765f1bddd51c96678e5 (patch) | |
tree | b568cc092a868d3a4226f529e943d3cde8e72f82 /src/basic/tmpfile-util.c | |
parent | 9be3c605706cd8430e330e9d16df372f5daccce2 (diff) | |
download | systemd-e92aaed30e0b5750e5633765f1bddd51c96678e5.tar.gz |
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.
Diffstat (limited to 'src/basic/tmpfile-util.c')
-rw-r--r-- | src/basic/tmpfile-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/tmpfile-util.c b/src/basic/tmpfile-util.c index dba0492ba8..669eb2666c 100644 --- a/src/basic/tmpfile-util.c +++ b/src/basic/tmpfile-util.c @@ -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); |