github.com/xyproto/u-root@v6.0.1-0.20200302025726-5528e0c77a3c+incompatible/cmds/core/elvish/eval/process_unix.go (about) 1 // +build !windows,!plan9 2 3 package eval 4 5 import ( 6 "os/signal" 7 "syscall" 8 9 "github.com/u-root/u-root/cmds/core/elvish/sys" 10 ) 11 12 // Process control functions in Unix. 13 14 func ignoreTTOU() { 15 signal.Ignore(syscall.SIGTTOU) 16 } 17 18 func unignoreTTOU() { 19 signal.Reset(syscall.SIGTTOU) 20 } 21 22 func putSelfInFg() error { 23 return sys.Tcsetpgrp(0, syscall.Getpgrp()) 24 } 25 26 func makeSysProcAttr(bg bool) *syscall.SysProcAttr { 27 return &syscall.SysProcAttr{Setpgid: bg} 28 }