delve/vendor/github.com/go-delve/liner/signal_unix.go
Alessandro Arzilli 3372f5ce5a
go.mod: Update version of go-delve/liner (#3619)
Update version of go-delve/liner to include the Ctrl-Z fix (SIGTSTP
should be sent to our process group instead of just sending it to
ourselves to correctly imitate a terminal).

Fixes #3605
2024-01-02 20:12:30 -08:00

17 lines
228 B
Go

// +build linux darwin openbsd freebsd netbsd
package liner
import (
"os"
"syscall"
)
func handleCtrlZ() {
pid := os.Getpid()
pgrp, err := syscall.Getpgid(pid)
if err == nil {
syscall.Kill(-pgrp, syscall.SIGTSTP)
}
}