Message356593
> To further elaborate on the creation time solution, the idea in pseudo-code is the following: (...)
> Technically there is still a race condition between _execute_child() and get_create_time(), but: (...)
Even if the approach seems to be different, PR 16984 seems to have the same advantages and drawbacks.
PR 16984 rely on the fact that the Linux kernel doesn't use a pid until its parent calls os.waitpid(). Even if the child process completed, the pid remains assigned (and the process status is "zombie").
PR 16984 has the advantage that it reuses existing code which has been battle tested: we are sure that the code is portable and works well.
Whereas get_create_time() will be likely platform specific and will add a little maintenance burden.
I know that PR 16984 is a partial solution (there is still a race condition if waitpid() is called directly, without using the Popen API), but I don't see a strong reason to prefer get_create_time(). |
|
Date |
User |
Action |
Args |
2019-11-14 11:08:49 | vstinner | set | recipients:
+ vstinner, giampaolo.rodola, njs |
2019-11-14 11:08:49 | vstinner | set | messageid: <1573729729.12.0.394332656354.issue38630@roundup.psfhosted.org> |
2019-11-14 11:08:49 | vstinner | link | issue38630 messages |
2019-11-14 11:08:48 | vstinner | create | |
|