chiark / gitweb /
sd-journal: close reading side of sd_journal_stream_fd() file descriptors
authorLennart Poettering <lennart@poettering.net>
Thu, 5 Jan 2012 20:39:31 +0000 (21:39 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 5 Jan 2012 20:39:31 +0000 (21:39 +0100)
src/journal/journal-send.c

index 176aac2..c382264 100644 (file)
@@ -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 = "";