github.com/oweisse/u-root@v0.0.0-20181109060735-d005ad25fef1/cmds/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/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 }