Skip to content

Commit 381f713

Browse files
authored
Don't promote SIGTERM to SIGKILL; let the users do it if needed (#173)
1 parent c610107 commit 381f713

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

cmd/dbos/start.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"os/signal"
88
"runtime"
99
"syscall"
10-
"time"
1110

1211
"github.com/spf13/cobra"
1312
)
@@ -83,21 +82,6 @@ func runStart(cmd *cobra.Command, args []string) error {
8382
process.Process.Kill()
8483
}
8584

86-
// Wait a bit for graceful shutdown
87-
select {
88-
case <-done:
89-
case <-sigChan:
90-
// Force kill if we get another signal
91-
if runtime.GOOS != "windows" {
92-
syscall.Kill(-process.Process.Pid, syscall.SIGKILL)
93-
}
94-
case <-time.After(10 * time.Second):
95-
// Force kill after timeout
96-
if runtime.GOOS != "windows" {
97-
syscall.Kill(-process.Process.Pid, syscall.SIGKILL)
98-
}
99-
}
100-
10185
os.Exit(0)
10286
}
10387
}

0 commit comments

Comments
 (0)