Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, janglin, pitrou
Date 2009-07-02.08:14:07
SpamBayes Score 1.10481e-07
Marked as misclassified No
Message-id <1246522450.28.0.141806036428.issue6394@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2009-07-02 08:14:10amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, pitrou, janglin
2009-07-02 08:14:10amaury.forgeotdarcsetmessageid: <1246522450.28.0.141806036428.issue6394@psf.upfronthosting.co.za>
2009-07-02 08:14:08amaury.forgeotdarclinkissue6394 messages
2009-07-02 08:14:07amaury.forgeotdarccreate