From 3ff08d46d98ad72dbcb3a17a0c73afb84f950543 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 25 Aug 2024 23:52:28 +0200 Subject: Fix line-buffered stderr mach_open_devstream creates a fully-buffered stream by default. This prevents from seeing various messages. --- libmachdev/trivfs_server.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libmachdev') diff --git a/libmachdev/trivfs_server.c b/libmachdev/trivfs_server.c index 4ce1ed36..e228bf40 100644 --- a/libmachdev/trivfs_server.c +++ b/libmachdev/trivfs_server.c @@ -399,6 +399,7 @@ resume_bootstrap_server(mach_port_t server_task, const char *server_name) stdin = mach_open_devstream (cons, "r"); stdout = stderr = mach_open_devstream (cons, "w"); mach_port_deallocate (mach_task_self (), cons); + setlinebuf (stderr); printf ("%s ", server_name); fflush (stdout); -- cgit v1.2.3