diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-08-24 15:35:06 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-08-24 15:35:06 +0000 |
commit | 409fe2a85188baaa8a737c1a4fe19fb0df47eb62 (patch) | |
tree | c59c9ba5ca00ed664fedc32b9a6557f4e3e41eb1 /system/musl/0007-abort-raise-SIGABRT-again-if-signal-is-ignored.patch | |
parent | 23e639121014d2e94bcf768313a46a9df3d85d41 (diff) | |
download | packages-409fe2a85188baaa8a737c1a4fe19fb0df47eb62.tar.gz packages-409fe2a85188baaa8a737c1a4fe19fb0df47eb62.tar.bz2 packages-409fe2a85188baaa8a737c1a4fe19fb0df47eb62.tar.xz packages-409fe2a85188baaa8a737c1a4fe19fb0df47eb62.zip |
system/musl: package patch now even with tip of POSIX branch
Diffstat (limited to 'system/musl/0007-abort-raise-SIGABRT-again-if-signal-is-ignored.patch')
-rw-r--r-- | system/musl/0007-abort-raise-SIGABRT-again-if-signal-is-ignored.patch | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/system/musl/0007-abort-raise-SIGABRT-again-if-signal-is-ignored.patch b/system/musl/0007-abort-raise-SIGABRT-again-if-signal-is-ignored.patch deleted file mode 100644 index 4ab303c7d..000000000 --- a/system/musl/0007-abort-raise-SIGABRT-again-if-signal-is-ignored.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 1316aae0c862240ff58b1cf38c92cd8cefd02a91 Mon Sep 17 00:00:00 2001 -From: "A. Wilcox" <AWilcox@Wilcox-Tech.com> -Date: Tue, 17 Apr 2018 22:08:48 -0500 -Subject: [PATCH 7/7] abort: raise SIGABRT again if signal is ignored - -POSIX requires that abort() gives the SIGABRT status to waitpid(3) and -friends. If a signal handler is installed, and erroneously returns, -then the status given to waitpid(3) is SIGSEGV instead of SIGABRT. - -This change gives another opportunity for the proper SIGABRT status to -be given to any process monitoring this one's process, before we fall -back to a_crash(), which should be sufficient. ---- - src/exit/abort.c | 18 ++++++++++++++++++ - 1 file changed, 18 insertions(+) - -diff --git a/src/exit/abort.c b/src/exit/abort.c -index ecc0f735..5e5a87c3 100644 ---- a/src/exit/abort.c -+++ b/src/exit/abort.c -@@ -1,13 +1,31 @@ - #include <stdlib.h> - #include <signal.h> -+#include <string.h> - #include "syscall.h" - #include "pthread_impl.h" - #include "atomic.h" - - _Noreturn void abort(void) - { -+ struct sigaction abrtaction; -+ sigset_t abrtset; -+ - raise(SIGABRT); - __block_all_sigs(0); -+ -+ /* Unblock just SIGABRT, and set default handler */ -+ sigemptyset(&abrtset); -+ sigaddset(&abrtset, SIGABRT); -+ sigprocmask(SIG_UNBLOCK, &abrtset, 0); -+ -+ memset(&abrtaction, 0, sizeof(struct sigaction)); -+ abrtaction.sa_handler = SIG_DFL; -+ -+ sigaction(SIGABRT, &abrtaction, NULL); -+ -+ raise(SIGABRT); -+ -+ /* Ok, give up. */ - a_crash(); - raise(SIGKILL); - _Exit(127); --- -2.15.0 - |