Message386774
The `multiprocessing.Process`, on Linux, ends up doing something like this:
pid = os.fork()
if pid == 0: os._exit()
Translated to C:
int main() {
Py_Initialize();
PyOS_BeforeFork();
pid_t pid = fork();
if (pid == 0) {
PyOS_AfterFork_Child(); // Reinitializes stuff.
_exit(0); // Child process exits without cleanup.
}
PyOS_AfterFork_Parent();
Py_Finalize();
}
The call to `_exit()` happens in Lib/multiprocessing/popen_fork.py#L73
My attempts at cleaning this up resulted in even more problems. |
|
Date |
User |
Action |
Args |
2021-02-10 11:20:06 | bstaletic | set | recipients:
+ bstaletic, YannickJadoul |
2021-02-10 11:20:06 | bstaletic | set | messageid: <1612956006.24.0.11506183498.issue43145@roundup.psfhosted.org> |
2021-02-10 11:20:06 | bstaletic | link | issue43145 messages |
2021-02-10 11:20:06 | bstaletic | create | |
|