mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-05-31 14:40:48 +00:00
parent
68db9cb499
commit
70c19ccf16
|
@ -7,6 +7,8 @@ import (
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
|
"golang.org/x/sys/unix"
|
||||||
)
|
)
|
||||||
|
|
||||||
func notifyOnResize(resizeChan chan<- os.Signal) {
|
func notifyOnResize(resizeChan chan<- os.Signal) {
|
||||||
|
@ -14,7 +16,12 @@ func notifyOnResize(resizeChan chan<- os.Signal) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func notifyStop(p *os.Process) {
|
func notifyStop(p *os.Process) {
|
||||||
p.Signal(syscall.SIGSTOP)
|
pid := p.Pid
|
||||||
|
pgid, err := unix.Getpgid(pid)
|
||||||
|
if err == nil {
|
||||||
|
pid = pgid * -1
|
||||||
|
}
|
||||||
|
unix.Kill(pid, syscall.SIGSTOP)
|
||||||
}
|
}
|
||||||
|
|
||||||
func notifyOnCont(resizeChan chan<- os.Signal) {
|
func notifyOnCont(resizeChan chan<- os.Signal) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user