fix(startup): make watchdog task keep agent alive
- Use Task Scheduler XML instead of /TR - Run -ensure agent in-process, not child - Add console close and panic protection - Guard nil event channels after stop - Add non-Windows stubs for startup/mutex
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
//go:build windows
|
||||
|
||||
package startup
|
||||
|
||||
import (
|
||||
@@ -67,5 +69,6 @@ func installedCommandLine() (string, error) {
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return `"` + exe + `" -background`, nil
|
||||
// Registry Run requires quotes around a path that may contain spaces.
|
||||
return `"` + exe + `"`, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user