Skip to content

Commit

Permalink
app_python3: call PyOS_AfterFork_Child() only in child processes
Browse files Browse the repository at this point in the history
- GH #3125: we should not call PyOS_AfterFork_Child() in the main
process.
  • Loading branch information
aalba6675 committed Jun 9, 2022
1 parent 73db408 commit 251bb74
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/modules/app_python3/app_python3_mod.c
Expand Up @@ -200,19 +200,19 @@ static int child_init(int rank)
* processes
*/
#if PY_VERSION_HEX >= 0x03070000
/* this is causing abort on Python 3.8+ GH#3125
* skip for now
PyOS_AfterFork_Parent() ;
*/
#endif
return 0;
}
_apy_process_rank = rank;

if (rank > 0) {
#if PY_VERSION_HEX >= 0x03070000
PyOS_AfterFork_Child();
PyOS_AfterFork_Child();
#else
PyOS_AfterFork();
PyOS_AfterFork();
#endif
}
if (cfg_child_init()) {
return -1;
}
Expand Down

0 comments on commit 251bb74

Please sign in to comment.