Skip to content

Commit b7664c7

Browse files
committed
Protect calls to fork with a gc_lock on all MacOS variations
Followup to #2124 We have reports of older version of MacOS showing the crash on fork even on M1 systems. Adding this thread protection appears to help those systems as well.
1 parent 05e5263 commit b7664c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mono/metadata/w32process-unix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1858,7 +1858,7 @@ process_create (const gunichar2 *appname, const gunichar2 *cmdline,
18581858
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER_PROCESS, "%s: new process startup not synchronized. We may not notice if the newly created process exits immediately.", __func__);
18591859
}
18601860

1861-
#if defined(HOST_DARWIN) && defined(TARGET_AMD64)
1861+
#if defined(HOST_DARWIN)
18621862
mono_gc_invoke_with_gc_lock(fork_helper, &pid);
18631863
#else
18641864
pid = fork();

0 commit comments

Comments
 (0)