From 2981701fbf57ee75292019c4eea9b36887b9ce4c Mon Sep 17 00:00:00 2001 From: fgsfds <4870330+fgsfds@users.noreply.github.com> Date: Sun, 3 Aug 2025 23:02:29 +0500 Subject: [PATCH] kill process instead of sending SIGTERM on Windows --- 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 {