From 89d7c97ce5dfca6f54bc1a10577638d94518b0e9 Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Mon, 15 May 2023 10:35:59 +0300 Subject: proc: Don't buffer Mach console output Normally glibc does not buffer tty output, but a devstream backed by the Mach console device cannot be isatty'ed. So we need to ask glibc explicitly to not buffer it. This is what the startup and mach-defpager do already. Message-Id: <20230515073600.1350072-3-bugaevc@gmail.com> --- proc/main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'proc/main.c') diff --git a/proc/main.c b/proc/main.c index 8a2dc9ff..747646ef 100644 --- a/proc/main.c +++ b/proc/main.c @@ -132,6 +132,7 @@ open_console (mach_port_t device_master) stdin = mach_open_devstream (cons, "r"); stdout = stderr = mach_open_devstream (cons, "w"); + setbuf (stdout, NULL); got_console = 1; mach_port_deallocate (mach_task_self (), cons); -- cgit v1.2.3