jerpelea opened a new pull request, #21223: URL: https://github.com/apache/nuttx/pull/21223
## Summary fclose() of stdin, stdout or stderr flushed the stream and returned, so the file descriptor stayed open. POSIX says that fclose() closes the file descriptor of any stream. A program that sends its output through a pipe and ends it with fclose(stdout) did not close the write end, so the reader got the end of file only when the program exited, or never if the program waits for the reader. This PR closes the file descriptor of the builtin streams as for any other stream. The FILE structures stay in the stream list and are not freed, and they keep -1 as the file descriptor, so a later use of the stream fails and does not reach a new file with the same descriptor. freopen() of the stream still works. The first commit fixes the old nxstyle error in lib_fclose.c, with no code change. ## Impact RELEASE ## Testing CI -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
