diff options
author | Cheng Shao <astrohavoc@gmail.com> | 2022-10-22 17:54:12 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-11 00:26:55 -0500 |
commit | ed3b3da00e2d7b997605926c60bbf55ddb9ba799 (patch) | |
tree | 3fc7e8830735f395e694fd24613f5499700af572 /rts/RtsUtils.c | |
parent | 50bf5e77891c6a28d1e610ba1da77f877195f1c0 (diff) | |
download | haskell-ed3b3da00e2d7b997605926c60bbf55ddb9ba799.tar.gz |
rts: genericRaise: use exit() instead when not HAVE_RAISE
We check existence of raise() in autoconf, and here, if not
HAVE_RAISE, we should use exit() instead in genericRaise.
Diffstat (limited to 'rts/RtsUtils.c')
-rw-r--r-- | rts/RtsUtils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rts/RtsUtils.c b/rts/RtsUtils.c index 2017884e48..d3dcdf3092 100644 --- a/rts/RtsUtils.c +++ b/rts/RtsUtils.c @@ -293,8 +293,10 @@ heapCheckFail( void ) int genericRaise(int sig) { #if defined(THREADED_RTS) && (defined(openbsd_HOST_OS) || defined(freebsd_HOST_OS) || defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS) || defined(darwin_HOST_OS)) return pthread_kill(pthread_self(), sig); -#else +#elif defined(HAVE_RAISE) return raise(sig); +#else + exit(sig); #endif } |