|
| 1 | +From b13d2be64ff7f855465002cd507cb830de0d43da Mon Sep 17 00:00:00 2001 |
| 2 | +From: Matthias Koeppe < [email protected]> |
| 3 | +Date: Wed, 24 Jan 2024 23:24:45 -0800 |
| 4 | +Subject: [PATCH] src/cysignals/implementation.c [EMSCRIPTEN]: Do not use |
| 5 | + sigaltstack |
| 6 | + |
| 7 | +--- |
| 8 | + src/cysignals/implementation.c | 4 +++- |
| 9 | + 1 file changed, 3 insertions(+), 1 deletion(-) |
| 10 | + |
| 11 | +diff --git a/src/cysignals/implementation.c b/src/cysignals/implementation.c |
| 12 | +index 2afd6ad..3088cdf 100644 |
| 13 | +--- a/src/cysignals/implementation.c |
| 14 | ++++ b/src/cysignals/implementation.c |
| 15 | +@@ -531,7 +531,7 @@ static void _sig_off_warning(const char* file, int line) |
| 16 | + |
| 17 | + static void setup_alt_stack(void) |
| 18 | + { |
| 19 | +-#if HAVE_SIGALTSTACK |
| 20 | ++#if HAVE_SIGALTSTACK && !defined(__EMSCRIPTEN__) |
| 21 | + /* Space for the alternate signal stack. The size should be |
| 22 | + * of the form MINSIGSTKSZ + constant. The constant is chosen rather |
| 23 | + * ad hoc but sufficiently large. |
| 24 | +@@ -576,7 +576,9 @@ static void setup_cysignals_handlers(void) |
| 25 | + * After setting up the trampoline, we reset the signal mask. */ |
| 26 | + sigprocmask(SIG_BLOCK, &sa.sa_mask, &default_sigmask); |
| 27 | + #endif |
| 28 | ++#if !defined(__EMSCRIPTEN__) |
| 29 | + setup_trampoline(); |
| 30 | ++#endif |
| 31 | + #if HAVE_SIGPROCMASK |
| 32 | + sigprocmask(SIG_SETMASK, &default_sigmask, &sigmask_with_sigint); |
| 33 | + #endif |
| 34 | +-- |
| 35 | +2.42.0 |
| 36 | + |
0 commit comments