elvish/pkg/eval/process_windows.go

18 lines
375 B
Go
Raw Normal View History

package eval
import "syscall"
// Nop on Windows.
func putSelfInFg() error { return nil }
2019-04-19 05:15:34 +08:00
// The bitmask for CreationFlags in SysProcAttr to start a process in background.
const detachedProcess = 0x00000008
func makeSysProcAttr(bg bool) *syscall.SysProcAttr {
flags := uint32(0)
if bg {
2019-04-19 05:15:34 +08:00
flags |= detachedProcess
}
return &syscall.SysProcAttr{CreationFlags: flags}
}