summaryrefslogtreecommitdiff
path: root/src/stdio
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-08-29 23:40:49 -0400
committerRich Felker <dalias@aerifal.cx>2018-08-29 23:40:49 -0400
commitddc947eda311331959c73dbc4491afcfe2326346 (patch)
tree431a2425543b036741f4849cc88524c03f217469 /src/stdio
parent35cd7c0950b1cb98b62e6dfb2be87e345dac75dd (diff)
downloadmusl-ddc947eda311331959c73dbc4491afcfe2326346.tar.gz
fix missing flush of stderr at exit if it was put in buffered mode
commit 0b80a7b0404b6e49b0b724e3e3fe0ed5af3b08ef added the ability to set application-provided stdio FILE buffers, adding the possibility that stderr might be buffered at exit time, but __stdio_exit did not have code to flush it. this regression was not present in any release.
Diffstat (limited to 'src/stdio')
-rw-r--r--src/stdio/__stdio_exit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/stdio/__stdio_exit.c b/src/stdio/__stdio_exit.c
index 191b4454..5741070f 100644
--- a/src/stdio/__stdio_exit.c
+++ b/src/stdio/__stdio_exit.c
@@ -19,6 +19,7 @@ void __stdio_exit(void)
for (f=*__ofl_lock(); f; f=f->next) close_file(f);
close_file(__stdin_used);
close_file(__stdout_used);
+ close_file(__stderr_used);
}
weak_alias(__stdio_exit, __stdio_exit_needed);