Skip to content

Commit

Permalink
support dashboard run on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
okaybase committed Sep 7, 2021
1 parent fc89bc4 commit 599869b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api/cmd/stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ func newStopCommand() *cobra.Command {
}
return
}
if err := syscall.Kill(pid, syscall.SIGINT); err != nil {
p, err := os.FindProcess(pid)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to find process manager-api: %s\n", err)
return
}
if err := p.Signal(syscall.SIGINT); err != nil {
fmt.Fprintf(os.Stderr, "failed to kill manager-api: %s", err)
}
},
Expand Down

0 comments on commit 599869b

Please sign in to comment.