We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6a7b6e commit 0ca9fc7Copy full SHA for 0ca9fc7
Modules/posixmodule.c
@@ -6818,8 +6818,16 @@ static void warn_about_fork_with_threads(const char* name) {
6818
if (num_python_threads > 1) {
6819
PyErr_WarnFormat(
6820
PyExc_DeprecationWarning, 1,
6821
- "multi-threaded process detected, "
6822
- "use of %s() may lead to deadlocks in the child.", name);
+#ifdef HAVE_GETPID
+ "This process (pid=%d) is multi-threaded, "
6823
+#else
6824
+ "This process is multi-threaded, "
6825
+#endif
6826
+ "use of %s() may lead to deadlocks in the child.",
6827
6828
+ getpid(),
6829
6830
+ name);
6831
PyErr_Clear();
6832
}
6833
0 commit comments