Author eryksun
Recipients eryksun, vstinner
Date 2020-03-31.15:36:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1585669017.54.0.50979600761.issue40094@roundup.psfhosted.org>
In-reply-to
Content
> On Windows, os.waitpid() status also requires an operation (shif 
> right by 8 bits) to get an exitcode from the waitpid status. 

FWIW, I wouldn't recommend relying on os.waitpid to get the correct process exit status in Windows. Status codes are 32 bits and generally all bits are required. os.waitpid left shifts the exit status by 8 bits in a dubious attempt to return a result that's "more like the POSIX waitpid". In particular, a program may exit abnormally with an NTSTATUS [1] or HRESULT [2] code such as STATUS_DLL_NOT_FOUND (0xC000_0135) or STATUS_CONTROL_C_EXIT (0xC000_013A).

[1]: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/87fba13e-bf06-450e-83b1-9241dc81e781
[2]: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/0642cb2f-2075-4469-918c-4441e69c548a
History
Date User Action Args
2020-03-31 15:36:57eryksunsetrecipients: + eryksun, vstinner
2020-03-31 15:36:57eryksunsetmessageid: <1585669017.54.0.50979600761.issue40094@roundup.psfhosted.org>
2020-03-31 15:36:57eryksunlinkissue40094 messages
2020-03-31 15:36:57eryksuncreate