summaryrefslogtreecommitdiff
path: root/LibC
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-11-10 00:56:10 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-11-10 00:56:10 +0100
commit8605711f4bb5404d0368343f14896f716963d864 (patch)
treee6a0b02872b9368a86a7a160e1247295046b3cc1 /LibC
parent3e3de67f025f427b557403193b0514ff19958c92 (diff)
downloadserenity-8605711f4bb5404d0368343f14896f716963d864.zip
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.
Diffstat (limited to 'LibC')
-rw-r--r--LibC/entry.cpp3
1 files changed, 3 insertions, 0 deletions
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);