Don't enable GC fork() support on Windows

A previous commit unconditionally configures Boehm GC to support fork.
This breaks the Windows MSVC build, producing an error dialog with the
message "Fatal error in GC: fork() handling unsupported".

This commit restricts the call to GC_set_handle_fork to non-Windows
hosts.
This commit is contained in:
Mark Shroyer 2023-10-22 20:02:28 -07:00 committed by Marius Gerbershagen
parent 798e3469e3
commit 3aab298147

View file

@ -760,12 +760,15 @@ 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.
* 4) GC should handle fork() which is used to run subprocess on
* some platforms.
*/
GC_set_no_dls(1);
GC_set_all_interior_pointers(0);
GC_set_time_limit(GC_TIME_UNLIMITED);
#ifndef ECL_MS_WINDOWS_HOST
GC_set_handle_fork(1);
#endif
GC_init();
#ifdef ECL_THREADS
# if GC_VERSION_MAJOR > 7 || GC_VERSION_MINOR > 1