From 8605711f4bb5404d0368343f14896f716963d864 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 10 Nov 2018 00:56:10 +0100 Subject: Make /bin/clear work again. After I made stdio buffered, we were dropping anything unflushed on exit. Since /bin/clear just prints out some escape sequences without a newline, the entire buffer was being discarded. Also add VirtualConsole::clear() that handles clearing of background VC's. --- LibC/entry.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'LibC') diff --git a/LibC/entry.cpp b/LibC/entry.cpp index d24be1ff07..2753137e2c 100644 --- a/LibC/entry.cpp +++ b/LibC/entry.cpp @@ -41,6 +41,9 @@ extern "C" int _start() goto epilogue; status = main(argc, argv); + fflush(stdout); + fflush(stderr); + epilogue: Syscall::invoke(Syscall::SC_exit, status); -- cgit v1.2.3