aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-05-01 11:33:44 +0200
committerGitHub <noreply@github.com>2020-05-01 11:33:44 +0200
commit252346acd937ddba4845331994b8ff4f90349625 (patch)
tree71d6298db81733d652abaa510c09ba90078efff0 /Programs
parentChange 'exception happened' to 'exception occurred' in two places (#19767) (diff)
downloadcpython-252346acd937ddba4845331994b8ff4f90349625.tar.gz
cpython-252346acd937ddba4845331994b8ff4f90349625.tar.bz2
cpython-252346acd937ddba4845331994b8ff4f90349625.zip
bpo-40453: Add PyConfig._isolated_subinterpreter (GH-19820)
An isolated subinterpreter cannot spawn threads, spawn a child process or call os.fork(). * Add private _Py_NewInterpreter(isolated_subinterpreter) function. * Add isolated=True keyword-only parameter to _xxsubinterpreters.create(). * Allow again os.fork() in "non-isolated" subinterpreters.
Diffstat (limited to 'Programs')
-rw-r--r--Programs/_testembed.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Programs/_testembed.c b/Programs/_testembed.c
index 2cf0d71b470..5c83678f650 100644
--- a/Programs/_testembed.c
+++ b/Programs/_testembed.c
@@ -603,6 +603,8 @@ static int test_init_from_config(void)
Py_FrozenFlag = 0;
config.pathconfig_warnings = 0;
+ config._isolated_interpreter = 1;
+
init_from_config_clear(&config);
dump_config();