| ... | @@ -722,9 +722,12 @@ pub fn raise(sig: u8) RaiseError!void { | ... | @@ -722,9 +722,12 @@ pub fn raise(sig: u8) RaiseError!void { |
| 722 | } | 722 | } |
| 723 | | 723 | |
| 724 | if (native_os == .linux) { | 724 | if (native_os == .linux) { |
| | 725 | // https://git.musl-libc.org/cgit/musl/commit/?id=0bed7e0acfd34e3fb63ca0e4d99b7592571355a9 |
| | 726 | // |
| | 727 | // Unlike musl, libc-less Zig std does not have any internal signals for implementation purposes, so we |
| | 728 | // need to block all signals on the assumption that any of them could potentially fork() in a handler. |
| 725 | var set: sigset_t = undefined; | 729 | var set: sigset_t = undefined; |
| 726 | // block application signals | 730 | sigprocmask(SIG.BLOCK, &linux.all_mask, &set); |
| 727 | sigprocmask(SIG.BLOCK, &linux.app_mask, &set); | | |
| 728 | | 731 | |
| 729 | const tid = linux.gettid(); | 732 | const tid = linux.gettid(); |
| 730 | const rc = linux.tkill(tid, sig); | 733 | const rc = linux.tkill(tid, sig); |