summaryrefslogtreecommitdiffstats
path: root/main/make/fix-atexit-exit.patch
blob: dd7cc25f79de614509f5ab3b7e5fc7a145260b51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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.

--- make-3.82.orig/misc.c
+++ make-3.82/misc.c
@@ -954,6 +954,6 @@
         error (NILF, _("write error: %s"), strerror (errno));
       else
         error (NILF, _("write error"));
-      exit (EXIT_FAILURE);
+      _exit (EXIT_FAILURE);
     }
 }