mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-06-10 06:14:43 +00:00
(fix): replace os.interrupt with reliable solution
This commit is contained in:
@@ -51,7 +51,12 @@ func (p *Program) olcrtcStop() {
|
||||
return
|
||||
}
|
||||
|
||||
err := p.Cmd.Process.Signal(os.Interrupt)
|
||||
var err error
|
||||
if p.Config.Os == "windows" {
|
||||
err = p.Cmd.Process.Kill()
|
||||
} else {
|
||||
err = p.Cmd.Process.Signal(os.Interrupt)
|
||||
}
|
||||
if err != nil {
|
||||
log("ERROR: Failed to signal olcrtc: %v", err)
|
||||
p.showError(err)
|
||||
|
||||
Reference in New Issue
Block a user