mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-23 03:16:52 +00:00
kill process instead of sending SIGTERM on Windows
This commit is contained in:
parent
73a5722cca
commit
2981701fbf
1 changed files with 6 additions and 1 deletions
|
@ -239,7 +239,12 @@ func (p *process) Stop() error {
|
||||||
if !p.IsRunning() {
|
if !p.IsRunning() {
|
||||||
return errors.New("xray is not running")
|
return errors.New("xray is not running")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if runtime.GOOS == "windows" {
|
||||||
|
return p.cmd.Process.Kill()
|
||||||
|
} else {
|
||||||
return p.cmd.Process.Signal(syscall.SIGTERM)
|
return p.cmd.Process.Signal(syscall.SIGTERM)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func writeCrashReport(m []byte) error {
|
func writeCrashReport(m []byte) error {
|
||||||
|
|
Loading…
Reference in a new issue