We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3985f25 commit ff751cdCopy full SHA for ff751cd
1 file changed
cmd/oktsec/commands/run.go
@@ -461,9 +461,11 @@ func killExistingInstance() {
461
}
462
var other int
463
if _, err := fmt.Sscanf(line, "%d", &other); err == nil && other != pid {
464
- _ = syscall.Kill(other, syscall.SIGTERM)
465
- // Brief wait for graceful shutdown.
466
- time.Sleep(200 * time.Millisecond)
+ if p, err := os.FindProcess(other); err == nil {
+ _ = p.Signal(os.Interrupt)
+ // Brief wait for graceful shutdown.
467
+ time.Sleep(200 * time.Millisecond)
468
+ }
469
470
471
0 commit comments