diff options
author | Manuel Novoa III <mjn3@codepoet.org> | 2002-03-12 01:18:50 +0000 |
---|---|---|
committer | Manuel Novoa III <mjn3@codepoet.org> | 2002-03-12 01:18:50 +0000 |
commit | 03e039820dc5092e27e81f3671652f25da7f25f1 (patch) | |
tree | 37bddad6951b8a6aa5d75184353705f672217812 /libc/stdlib/atexit.c | |
parent | ff3e48d94097ed02480bb0df538620b221ccd72f (diff) |
Swap in the new stdio code.
Diffstat (limited to 'libc/stdlib/atexit.c')
-rw-r--r-- | libc/stdlib/atexit.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libc/stdlib/atexit.c b/libc/stdlib/atexit.c index d22d6a5e7..95047e78f 100644 --- a/libc/stdlib/atexit.c +++ b/libc/stdlib/atexit.c @@ -17,7 +17,7 @@ * Changed name of __cleanup to __uClibc_cleanup. * Moved declaration of __uClibc_cleanup to __uClibc_main * where it is initialized with (possibly weak alias) - * __stdio_flush_buffers. + * _stdio_term. * * Jul 2001 Steve Thayer * @@ -141,7 +141,7 @@ void __exit_handler(int status) #endif #ifdef L_exit -extern void weak_function __stdio_flush_buffers(void); +extern void weak_function _stdio_term(void); void (*__exit_cleanup) (int) = 0; /* @@ -154,9 +154,12 @@ void exit(int rv) __exit_cleanup(rv); } - /* Clean up everything else */ - if (__stdio_flush_buffers) - __stdio_flush_buffers(); + /* If we are using stdio, try to shut it down. At the very least, + * this will attempt to commit all buffered writes. It may also + * unbuffer all writable files, or close them outright. + * Check the stdio routines for details. */ + if (_stdio_term) + _stdio_term(); _exit(rv); } |