diff options
| author | fgsfds <4870330+fgsfds@users.noreply.github.com> | 2025-08-04 01:45:50 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-04 01:45:50 +0300 |
| commit | a4c4f9efb3e896c8634b8746aadfe4b1446242e2 (patch) | |
| tree | c3d9649016df587b26583d193515fb0a829085c3 | |
| parent | 73a5722cca0b4c06f58630ace5d90f36dc544833 (diff) | |
kill process instead of sending SIGTERM on Windows (#3304)
| -rw-r--r-- | xray/process.go | 7 |
1 files changed, 6 insertions, 1 deletions
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 { |
