You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ch...@apache.org on 2021/09/08 02:49:02 UTC

[apisix-dashboard] branch master updated: feat: support Manager API run on windows (#2125)

This is an automated email from the ASF dual-hosted git repository.

chenjunxu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 98fe38a  feat: support Manager API run on windows (#2125)
98fe38a is described below

commit 98fe38abba1deb186a65801fc68a2e7512fb3629
Author: okaybase <75...@users.noreply.github.com>
AuthorDate: Wed Sep 8 10:48:57 2021 +0800

    feat: support Manager API run on windows (#2125)
---
 api/cmd/stop.go | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/api/cmd/stop.go b/api/cmd/stop.go
index 8bf31ea..02d147e 100644
--- a/api/cmd/stop.go
+++ b/api/cmd/stop.go
@@ -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)
 			}
 		},