|
@@ -218,6 +218,10 @@ void (*__exit_cleanup) (int) = 0;
|
|
|
pthread_mutex_t mylock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
|
|
|
#endif
|
|
|
|
|
|
+#ifdef __UCLIBC_CTOR_DTOR__
|
|
|
+extern void (*__app_fini)(void);
|
|
|
+#endif
|
|
|
+
|
|
|
|
|
|
* Normal program termination
|
|
|
*/
|
|
@@ -230,6 +234,11 @@ void exit(int rv)
|
|
|
}
|
|
|
UNLOCK;
|
|
|
|
|
|
+#ifdef __UCLIBC_CTOR_DTOR__
|
|
|
+ if (__app_fini != NULL)
|
|
|
+ (__app_fini)();
|
|
|
+#endif
|
|
|
+
|
|
|
|
|
|
* this will attempt to commit all buffered writes. It may also
|
|
|
* unbuffer all writable files, or close them outright.
|