Issue #18604: merge from 3.4
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index d26281a..40aab96 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -434,7 +434,9 @@
                 reason = "cannot run without OS X gui process"
 
     # check on every platform whether tkinter can actually do anything
-    if not reason:
+    # but skip the test on OS X because it can cause segfaults in Cocoa Tk
+    # when running regrtest with the -j option (multiple threads/subprocesses)
+    if (not reason) and (sys.platform != 'darwin'):
         try:
             from tkinter import Tk
             root = Tk()