From fa9221ae6b2a7154efe2560db291fa02a8daa5aa Mon Sep 17 00:00:00 2001 From: "Kirill A. Korinsky" Date: Mon, 25 Sep 2023 05:06:55 +0000 Subject: [PATCH] Enable handle fork by GC --- src/c/alloc_2.d | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/c/alloc_2.d b/src/c/alloc_2.d index 761298d5a..04c69ba52 100644 --- a/src/c/alloc_2.d +++ b/src/c/alloc_2.d @@ -760,10 +760,12 @@ init_alloc(void) * the begining or to the first byte. * 3) Out of the incremental garbage collector, we only use the * generational component. + * 4) GC should handle fork() which is used to run subprocess. */ GC_set_no_dls(1); GC_set_all_interior_pointers(0); GC_set_time_limit(GC_TIME_UNLIMITED); + GC_set_handle_fork(1); GC_init(); #ifdef ECL_THREADS # if GC_VERSION_MAJOR > 7 || GC_VERSION_MINOR > 1