teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone
Blob Blame History Raw
From 8d872d28194f58da2311ca88072084458dc2eb15 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 16 Dec 2013 20:00:09 +0100
Subject: [PATCH] execute: also set SO_SNDBUF when spawning a service with
 stdout/stderr connected to journald

---
 src/core/execute.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/core/execute.c b/src/core/execute.c
index 58be72a..9b85379 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -75,6 +75,8 @@
 /* This assumes there is a 'tty' group */
 #define TTY_MODE 0620
 
+#define SNDBUF_SIZE (8*1024*1024)
+
 static int shift_fds(int fds[], unsigned n_fds) {
         int start, restart_from;
 
@@ -232,6 +234,8 @@ static int connect_logger_as(const ExecContext *context, ExecOutput output, cons
                 return -errno;
         }
 
+        fd_inc_sndbuf(fd, SNDBUF_SIZE);
+
         dprintf(fd,
                 "%s\n"
                 "%s\n"