summaryrefslogtreecommitdiff
path: root/src/w32proc.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2022-05-30 20:51:19 +0300
committerEli Zaretskii <eliz@gnu.org>2022-05-30 20:51:19 +0300
commitc9e5e79ac21c0593678a1a75b58bcb5b9e0dbcc3 (patch)
tree0c89fe0692fc8ea005e5a2f91f031d9798953cd5 /src/w32proc.c
parent4132223d897290a5c04791ea1178faa5858a98f0 (diff)
downloademacs-c9e5e79ac21c0593678a1a75b58bcb5b9e0dbcc3.tar.gz
emacs-c9e5e79ac21c0593678a1a75b58bcb5b9e0dbcc3.tar.bz2
emacs-c9e5e79ac21c0593678a1a75b58bcb5b9e0dbcc3.zip
Fix 'debug-timer-check' on MS-Windows
* src/w32proc.c (w32_raise): New function. * src/atimer.c (raise) [WINDOWSNT]: Redirect to 'w32_raise'.
Diffstat (limited to 'src/w32proc.c')
-rw-r--r--src/w32proc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/w32proc.c b/src/w32proc.c
index 781a19f480f..7acfba64d70 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -63,6 +63,8 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include "w32term.h"
#include "coding.h"
+void w32_raise (int);
+
#define RVA_TO_PTR(var,section,filedata) \
((void *)((section)->PointerToRawData \
+ ((DWORD_PTR)(var) - (section)->VirtualAddress) \
@@ -311,6 +313,21 @@ sigismember (const sigset_t *set, int signo)
return (*set & (1U << signo)) != 0;
}
+/* A fuller emulation of 'raise', which supports signals that MS
+ runtime doesn't know about. */
+void
+w32_raise (int signo)
+{
+ if (!(signo == SIGCHLD || signo == SIGALRM || signo == SIGPROF))
+ raise (signo);
+
+ /* Call the handler directly for the signals that we handle
+ ourselves. */
+ signal_handler handler = sig_handlers[signo];
+ if (!(handler == SIG_DFL || handler == SIG_IGN || handler == SIG_ERR))
+ handler (signo);
+}
+
pid_t
getpgrp (void)
{