summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-01-05 21:39:31 +0100
committerLennart Poettering <lennart@poettering.net>2012-01-05 21:39:31 +0100
commit86b9b8e70d54e79db3ff4f67bbd5280ecfc82537 (patch)
tree43ac4daf526a0061ab5d3219d14a789f6a4c1f70
parentexecute: talk directly to the journald, instead to the stdout-syslog-bridge (diff)
downloadsystemd-86b9b8e70d54e79db3ff4f67bbd5280ecfc82537.tar.gz
systemd-86b9b8e70d54e79db3ff4f67bbd5280ecfc82537.tar.bz2
systemd-86b9b8e70d54e79db3ff4f67bbd5280ecfc82537.zip
sd-journal: close reading side of sd_journal_stream_fd() file descriptors
-rw-r--r--src/journal/journal-send.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
index 176aac279..c38226468 100644
--- a/src/journal/journal-send.c
+++ b/src/journal/journal-send.c
@@ -233,6 +233,11 @@ _public_ int sd_journal_stream_fd(const char *tag, int priority, int priority_pr
return -errno;
}
+ if (shutdown(fd, SHUT_RD) < 0) {
+ close_nointr_nofail(fd);
+ return -errno;
+ }
+
if (!tag)
tag = "";