diff --git a/src/modules/app_python3/app_python3_mod.c b/src/modules/app_python3/app_python3_mod.c index d250640e0c9..376d1c13120 100644 --- a/src/modules/app_python3/app_python3_mod.c +++ b/src/modules/app_python3/app_python3_mod.c @@ -185,9 +185,6 @@ static int child_init(int rank) * this is called before any process is forked * so the Python internal state handler * should be called now. - * - * TODO: is PyOS_AfterFork_Parent() necesary - * in the main process? */ #if PY_VERSION_HEX >= 0x03070000 PyOS_BeforeFork() ; @@ -206,7 +203,7 @@ static int child_init(int rank) } _apy_process_rank = rank; - if (rank > 0) { + if (!_ksr_is_main) { #if PY_VERSION_HEX >= 0x03070000 PyOS_AfterFork_Child(); #else