From e42adab4f91ca30ccc922447296cdca3e845ff75 Mon Sep 17 00:00:00 2001 From: PhrAx Date: Sat, 29 May 2021 23:46:08 -0700 Subject: [PATCH] improving stdout for logging by disabling buffering --- src/raspberrypi/rascsi.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/raspberrypi/rascsi.cpp b/src/raspberrypi/rascsi.cpp index a91c5bb6..6aa7ae6d 100644 --- a/src/raspberrypi/rascsi.cpp +++ b/src/raspberrypi/rascsi.cpp @@ -1121,6 +1121,8 @@ int main(int argc, char* argv[]) DWORD now; BUS::phase_t phase; BYTE data; + // added setvbuf to overtime stdout buffering, so logs are written immediately and not when the process exits. + setvbuf(stdout, NULL, _IONBF, 0); #ifndef BAREMETAL struct sched_param schparam; #endif // BAREMETAL