gh-144652: Support Windows exit status in support get_signal_name() (GH-144653)
Format Windows exit status as hexadecimal.
(cherry picked from commit
b121dc434748772272514311fe315e009fdfe6e5)
Co-authored-by: Victor Stinner <vstinner@python.org>
except KeyError:
pass
+ # Format Windows exit status as hexadecimal
+ if 0xC0000000 <= exitcode:
+ return f"0x{exitcode:X}"
+
return None
class BrokenIter:
(128 + int(signal.SIGABRT), 'SIGABRT'),
(3221225477, "STATUS_ACCESS_VIOLATION"),
(0xC00000FD, "STATUS_STACK_OVERFLOW"),
+ (0xC0000906, "0xC0000906"),
):
self.assertEqual(support.get_signal_name(exitcode), expected,
exitcode)