mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00:00
The POSIX standard specifies the following: > If the main() function returns to its original caller, or if the > exit() function is called, all open files are closed (hence all output > streams are flushed) before program termination. This means that flushing `stdin` and `stdout` only is not enough, as the program might have pending writes in other file buffers too. Now that we support `fflush(nullptr)`, we call that in `exit()` to flush all streams. This fixes one of bash's generated headers not being written to disk.
36 KiB
36 KiB