Skip to content

Commit efd4582

Browse files
authored
Fixed Windows compilation failure (#998)
1 parent 0357ffa commit efd4582

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/internal_worker_base.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"context"
2828
"errors"
2929
"fmt"
30+
"os"
3031
"sync"
3132
"syscall"
3233
"time"
@@ -265,7 +266,8 @@ func (bw *baseWorker) pollTask() {
265266
if err != nil {
266267
if isNonRetriableError(err) {
267268
bw.logger.Error("Worker received non-retriable error. Shutting down.", zap.Error(err))
268-
syscall.Kill(syscall.Getpid(), syscall.SIGINT)
269+
p, _ := os.FindProcess(os.Getpid())
270+
p.Signal(syscall.SIGINT)
269271
return
270272
}
271273
bw.retrier.Failed()

0 commit comments

Comments
 (0)