1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00
Files
lancet/system/os_linux.go
2023-04-17 14:06:49 +08:00

19 lines
260 B
Go

package system
import (
"os/exec"
"syscall"
)
func WithForeground() Option {
return func(c *exec.Cmd) {
if c.SysProcAttr == nil {
c.SysProcAttr = &syscall.SysProcAttr{
Foreground: true,
}
} else {
c.SysProcAttr.Foreground = true
}
}
}