Message90001
First, I checked that the API does exist on Window 2000. And python does
not have any "never fail guarantee", specially in low memory conditions.
Then, some remarks:
- If Process32First or Process32Next fail for any reason, "return
win32_error(...)" is called, but the GetLastError function won't find
the cause because CloseHandle will clear it.
- It would be nice to add a comment like "if the loop ends and our pid
was not found, GetLastError() will return ERROR_NO_MORE_FILES. This is
an error anyway, so let's raise this."
- A unit test is necessary: it could use a subprocess and compare
getpid() with the child's getppid().
- The documentation should state what happens when the parent process
exits. Is the ppid reset to zero? Is it possible to have another new
process with the same ppid? |
|
| Date |
User |
Action |
Args |
| 2009-07-02 08:14:10 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc, pitrou, janglin |
| 2009-07-02 08:14:10 | amaury.forgeotdarc | set | messageid: <1246522450.28.0.141806036428.issue6394@psf.upfronthosting.co.za> |
| 2009-07-02 08:14:08 | amaury.forgeotdarc | link | issue6394 messages |
| 2009-07-02 08:14:07 | amaury.forgeotdarc | create | |
|