summaryrefslogtreecommitdiff
path: root/rts/Prelude.h
diff options
context:
space:
mode:
authorAlexander Vershilov <alexander.vershilov@gmail.com>2016-12-02 14:32:48 -0500
committerBen Gamari <ben@smart-cactus.org>2016-12-02 15:29:15 -0500
commit895a131f6e56847d9ebca2e9bfe19a3189e49d72 (patch)
tree0b54a54e22104ccf5b790a02448f6fb6875812a2 /rts/Prelude.h
parentf46369b8a1bf90a3bdc30f2b566c3a7e03672518 (diff)
downloadhaskell-895a131f6e56847d9ebca2e9bfe19a3189e49d72.tar.gz
Install toplevel handler inside fork.
When rts is forked it doesn't update toplevel handler, so UserInterrupt exception is sent to Thread1 that doesn't exist in forked process. We install toplevel handler when fork so signal will be delivered to the new main thread. Fixes #12903 Reviewers: simonmar, austin, erikd, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2770 GHC Trac Issues: #12903
Diffstat (limited to 'rts/Prelude.h')
-rw-r--r--rts/Prelude.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/rts/Prelude.h b/rts/Prelude.h
index 16881eb423..0186b5092b 100644
--- a/rts/Prelude.h
+++ b/rts/Prelude.h
@@ -52,6 +52,7 @@ PRELUDE_CLOSURE(base_GHCziConcziIO_ioManagerCapabilitiesChanged_closure);
PRELUDE_CLOSURE(base_GHCziConcziSignal_runHandlersPtr_closure);
PRELUDE_CLOSURE(base_GHCziTopHandler_flushStdHandles_closure);
+PRELUDE_CLOSURE(base_GHCziTopHandler_runMainIO_closure);
PRELUDE_INFO(ghczmprim_GHCziTypes_Czh_con_info);
PRELUDE_INFO(ghczmprim_GHCziTypes_Izh_con_info);
@@ -84,6 +85,7 @@ PRELUDE_INFO(base_GHCziStable_StablePtr_con_info);
#define runHandlersPtr_closure DLL_IMPORT_DATA_REF(base_GHCziConcziSignal_runHandlersPtr_closure)
#define flushStdHandles_closure DLL_IMPORT_DATA_REF(base_GHCziTopHandler_flushStdHandles_closure)
+#define runMainIO_closure DLL_IMPORT_DATA_REF(base_GHCziTopHandler_runMainIO_closure)
#define stackOverflow_closure DLL_IMPORT_DATA_REF(base_GHCziIOziException_stackOverflow_closure)
#define heapOverflow_closure DLL_IMPORT_DATA_REF(base_GHCziIOziException_heapOverflow_closure)