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.
This commit is contained in:
Andreas Kling 2018-11-10 00:56:10 +01:00
commit 8605711f4b
Notes: sideshowbarker 2024-07-19 16:11:41 +09:00
4 changed files with 19 additions and 3 deletions

View file

@ -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);