summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-05-19 11:34:04 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-05-19 11:34:04 +0000
commit9c3b406b4d68225fcb6e2fadb41ed0a4358083b0 (patch)
tree0ae4957fa82a9fd93b56309f8953d1a8181e7fd3 /cpukit
parentRemoved prototype of rtems_libio_config() per Chris Johns' eagle eye. (diff)
downloadrtems-9c3b406b4d68225fcb6e2fadb41ed0a4358083b0.tar.bz2
Addition of tcdrain() from Eric Norum.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libcsupport/src/newlibc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/cpukit/libcsupport/src/newlibc.c b/cpukit/libcsupport/src/newlibc.c
index 8fb1916d7e..089c7e7541 100644
--- a/cpukit/libcsupport/src/newlibc.c
+++ b/cpukit/libcsupport/src/newlibc.c
@@ -64,6 +64,8 @@ struct _reent libc_global_reent = _REENT_INIT(libc_global_reent);
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
+#include <stdio.h>
+
void
libc_wrapup(void)
{
@@ -86,6 +88,16 @@ libc_wrapup(void)
#endif
_REENT = &libc_global_reent;
}
+
+ /*
+ * Try to drain output buffers.
+ *
+ * Should this be changed to do *all* file streams?
+ * _fwalk (_REENT, fclose);
+ */
+ fclose (stdin);
+ fclose (stdout);
+ fclose (stderr);
}