win: add missing hidewindow syscall
This commit is contained in:
parent
fa6d7afa05
commit
63328251fa
|
@ -52,6 +52,7 @@ func Run(conf *service.Service) {
|
||||||
|
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
cmd := exec.Command(binpath, args...)
|
cmd := exec.Command(binpath, args...)
|
||||||
|
backgroundCmd(cmd)
|
||||||
fmt.Fprintf(lf, "[%s] Starting %q %s \n", time.Now(), binpath, strings.Join(args, " "))
|
fmt.Fprintf(lf, "[%s] Starting %q %s \n", time.Now(), binpath, strings.Join(args, " "))
|
||||||
|
|
||||||
cmd.Stdin = nil
|
cmd.Stdin = nil
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
// +build !windows
|
||||||
|
|
||||||
|
package runner
|
||||||
|
|
||||||
|
import "os/exec"
|
||||||
|
|
||||||
|
func backgroundCmd(cmd *exec.Cmd) {
|
||||||
|
}
|
|
@ -2,11 +2,9 @@ package runner
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"syscall"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func backgroundCmd(cmd *exec.Cmd) {
|
||||||
cmd, _ := exec.LookPath("cmd.exe")
|
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
|
||||||
if "" != cmd {
|
}
|
||||||
shellArgs = []string{cmd, "/c"}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue