From b6cf05e16c19a6f6290a21fd9556738e47653a22 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Mon, 9 Aug 2021 20:55:48 -0700 Subject: [PATCH] Disable stdout buffering --- system/src/riju-system-privileged.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system/src/riju-system-privileged.c b/system/src/riju-system-privileged.c index c395645..07c6e0d 100644 --- a/system/src/riju-system-privileged.c +++ b/system/src/riju-system-privileged.c @@ -258,6 +258,8 @@ void session(char *uuid, char *lang, char *imageHash) void exec(char *uuid, int argc, char **cmdline, bool pty) { + if (setvbuf(stdout, NULL, _IONBF, 0) != 0) + die("setvbuf failed"); char *share, *ctlFIFO, *inputFIFO, *outputFIFO, *ctlCmd, *dataFIFO; if (asprintf(&share, "/var/run/riju/shares/%s", uuid) < 0) die("asprintf failed");