File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ type ExitStatus struct {
5
5
Code int
6
6
Signaled bool
7
7
typ exitType
8
+ killed bool
8
9
}
9
10
10
11
// IsTimedOut returns the command timed out or not
@@ -19,7 +20,7 @@ func (ex *ExitStatus) IsCanceled() bool {
19
20
20
21
// IsKilled returns the command is killed or not
21
22
func (ex * ExitStatus ) IsKilled () bool {
22
- return ex .Code == 137 && ex . Signaled
23
+ return ex .killed
23
24
}
24
25
25
26
// GetExitCode gets the exit code for command line tools
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ func (tio *Timeout) handleTimeout(ctx context.Context) *ExitStatus {
153
153
tio .killall ()
154
154
// just to make sure
155
155
cmd .Process .Kill ()
156
+ ex .killed = true
156
157
if ex .typ != exitTypeCanceled {
157
158
ex .typ = exitTypeKilled
158
159
}
You can’t perform that action at this time.
0 commit comments