fix usage of locks with vfork
[musl] / src / stdio / __towrite.c
index 4bf96f4..380ea39 100644 (file)
@@ -17,8 +17,11 @@ int __towrite(FILE *f)
        return 0;
 }
 
-/* Link flush-on-exit code iff any stdio write functions are linked. */
-void __fflush_on_exit()
+const int __towrite_used = 1;
+
+void __stdio_exit(void);
+
+void __flush_on_exit()
 {
-       fflush(0);
+       __stdio_exit();
 }