File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -698,6
CE4E
+698,14 @@ def get_signal_name(exitcode):
698
698
except ValueError :
699
699
pass
700
700
701
+ # Shell exit code (ex: WASI build)
702
+ if 128 < exitcode < 256 :
703
+ signum = exitcode - 128
704
+ try :
705
+ return signal .Signals (signum ).name
706
+ except ValueError :
707
+ pass
708
+
701
709
try :
702
710
return WINDOWS_STATUS [exitcode ]
703
711
except KeyError :
Original file line number Diff line number Diff line change @@ -2291,6 +2291,7 @@ def test_get_signal_name(self):
2291
2291
for exitcode , expected in (
2292
2292
(- int (signal .SIGINT ), 'SIGINT' ),
2293
2293
(- int (signal .SIGSEGV ), 'SIGSEGV' ),
2294
+ (128 + int (signal .SIGABRT ), 'SIGABRT' ),
2294
2295
(3221225477 , "STATUS_ACCESS_VIOLATION" ),
2295
2296
(0xC00000FD , "STATUS_STACK_OVERFLOW" ),
2296
2297
):
You can’t perform that action at this time.
0 commit comments