xiaoxiang781216 commented on code in PR #1559: URL: https://github.com/apache/nuttx-apps/pull/1559#discussion_r1103530397
########## nshlib/nsh_altconsole.c: ########## @@ -62,7 +62,7 @@ static int nsh_clone_console(FAR struct console_stdio_s *pstate) /* Flush stderr: we only flush stderr if we opened the alternative one */ - fflush(stderr); + fsync(STDERR_FILENO); Review Comment: le's remove fsync call since fflush just flush the buffer at stdio layer, not vfs layer. So, we don't need do anything here after changing file stream to file handle. ########## nshlib/nsh_altconsole.c: ########## @@ -85,7 +85,7 @@ static int nsh_clone_console(FAR struct console_stdio_s *pstate) /* Flush stdout: we only flush stdout if we opened the alternative one */ - fflush(stdout); + fsync(STDOUT_FILENO); Review Comment: ditto -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org