delve/vendor/github.com/peterh/liner/signal_unix.go
Derek Parker dee4437bd0
pkg/terminal: support ctrlz for shell job control (#2806)
* pkg/terminal: support ctrlz for shell job control

This required forking peterh/liner under the go-delve org and using that
instead since upstream is not open to supporting this feature.

Fixes #2157

* Update liner

* Update liner but correctly this time

* upgrade golang.org/x/tools to 0.1.9
2022-02-10 09:50:55 -08:00

16 lines
201 B
Go

// +build linux darwin openbsd freebsd netbsd
package liner
import (
"os"
"syscall"
)
func handleCtrlZ() {
p, err := os.FindProcess(os.Getpid())
if err == nil {
p.Signal(syscall.SIGTSTP)
}
}