From a4c4f9efb3e896c8634b8746aadfe4b1446242e2 Mon Sep 17 00:00:00 2001 From: fgsfds <4870330+fgsfds@users.noreply.github.com> Date: Mon, 4 Aug 2025 03:45:50 +0500 Subject: [PATCH] kill process instead of sending SIGTERM on Windows (#3304) --- xray/process.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xray/process.go b/xray/process.go index 335ad9c1..21ca5223 100644 --- a/xray/process.go +++ b/xray/process.go @@ -239,7 +239,12 @@ func (p *process) Stop() error { if !p.IsRunning() { return errors.New("xray is not running") } - return p.cmd.Process.Signal(syscall.SIGTERM) + + if runtime.GOOS == "windows" { + return p.cmd.Process.Kill() + } else { + return p.cmd.Process.Signal(syscall.SIGTERM) + } } func writeCrashReport(m []byte) error {