From 07c14fcfbd8b0843afca707b72fad77fc64a2098 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 16 Jan 2025 15:37:02 -0500 Subject: [PATCH] shared/shell: Always set stdout to be line buffered This always set stdout to be line buffered to avoid cluttering the output: https://github.com/bluez/bluez/issues/747#issuecomment-2596840382 --- src/shared/shell.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/shell.c b/src/shared/shell.c index aa6c16c8c..37c747f8f 100644 --- a/src/shared/shell.c +++ b/src/shared/shell.c @@ -1268,7 +1268,6 @@ static void rl_init(void) /* Allow conditional parsing of the ~/.inputrc file. */ rl_readline_name = data.name; - setlinebuf(stdout); rl_attempted_completion_function = shell_completion; rl_erase_empty_line = 1; @@ -1405,6 +1404,8 @@ done: mainloop_init(); + /* Always set stdout as line buffered */ + setlinebuf(stdout); rl_init(); data.init = true; -- 2.47.3