summaryrefslogtreecommitdiffstats
path: root/src/basic/fileio.c
diff options
context:
space:
mode:
authorChris Down <chris@chrisdown.name>2018-12-12 15:58:46 +0100
committerLennart Poettering <lennart@poettering.net>2018-12-12 20:47:40 +0100
commite92aaed30e0b5750e5633765f1bddd51c96678e5 (patch)
treeb568cc092a868d3a4226f529e943d3cde8e72f82 /src/basic/fileio.c
parentMerge pull request #10892 from mbiebl/revert-systemctl-runtime-unmask-breakage (diff)
downloadsystemd-e92aaed30e0b5750e5633765f1bddd51c96678e5.tar.xz
systemd-e92aaed30e0b5750e5633765f1bddd51c96678e5.zip
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/fileio.c')
-rw-r--r--src/basic/fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/fileio.c b/src/basic/fileio.c
index 4c200f8393..11972a6213 100644
--- a/src/basic/fileio.c
+++ b/src/basic/fileio.c
@@ -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);