stdio: need also flush stdio when flushall

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2022-05-09 22:19:31 +08:00 committed by Petro Karashchenko
parent d04ed9587b
commit 3db8c2b6a6

View File

@ -55,10 +55,17 @@ int lib_flushall(FAR struct streamlist *list)
if (list)
{
FAR FILE *stream;
int i;
/* Process each stream in the thread's stream list */
lib_stream_semtake(list);
for (i = 0; i < 3; i++)
{
lib_fflush(&list->sl_std[i], true);
}
stream = list->sl_head;
for (; stream != NULL; stream = stream->fs_next)
{