mirror of https://github.com/Hilbis/Hilbish
fix: set bg proc attr in build tagged file
parent
1522749397
commit
4bc94ce916
12
exec.go
12
exec.go
|
@ -359,18 +359,6 @@ func execHandle(bg bool) interp.ExecHandlerFunc {
|
|||
|
||||
var j *job
|
||||
if bg {
|
||||
var procAttr *syscall.SysProcAttr
|
||||
if runtime.GOOS == "windows" {
|
||||
procAttr = &syscall.SysProcAttr{
|
||||
CreationFlags: syscall.CREATE_NEW_PROCESS_GROUP,
|
||||
}
|
||||
} else {
|
||||
procAttr = &syscall.SysProcAttr{
|
||||
Setpgid: true,
|
||||
}
|
||||
}
|
||||
cmd.SysProcAttr = procAttr
|
||||
|
||||
j = jobs.getLatest()
|
||||
j.setHandle(&cmd)
|
||||
err = j.start()
|
||||
|
|
|
@ -4,8 +4,13 @@ package main
|
|||
|
||||
import (
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
var bgProcAttr *syscall.SysProcAttr = &syscall.SysProcAttr{
|
||||
Setpgid: true,
|
||||
}
|
||||
|
||||
func findExecutable(path string, inPath, dirs bool) error {
|
||||
f, err := os.Stat(path)
|
||||
if err != nil {
|
||||
|
|
|
@ -5,8 +5,13 @@ package main
|
|||
import (
|
||||
"path/filepath"
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
var bgProcAttr *syscall.SysProcAttr = &syscall.SysProcAttr{
|
||||
CreationFlags: syscall.CREATE_NEW_PROCESS_GROUP,
|
||||
}
|
||||
|
||||
func findExecutable(path string, inPath, dirs bool) error {
|
||||
nameExt := filepath.Ext(path)
|
||||
pathExts := filepath.SplitList(os.Getenv("PATHEXT"))
|
||||
|
|
Loading…
Reference in New Issue