aports/main/make/fix-atexit-exit.patch
2014-10-06 11:38:20 +00:00

18 lines
454 B
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Author: Timo Teräs <timo.teras@iki.fi>
POSIX says the behaviour is undefined if atexit callback calls
exit(). On glibc it works, but on musl it does not. Call instead
_exit() which is guaranteed to work.
--- ./output.c.orig
+++ ./output.c
@@ -495,7 +495,7 @@
perror_with_name (_("write error: stdout"), "");
else
O (error, NILF, _("write error: stdout"));
- exit (MAKE_TROUBLE);
+ _exit (MAKE_TROUBLE);
}
}