You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
291 B

3 weeks ago
//go:build !windows
package readline
import (
"syscall"
)
func handleCharCtrlZ(fd uintptr, termios any) (string, error) {
t := termios.(*Termios)
if err := UnsetRawMode(fd, t); err != nil {
return "", err
}
_ = syscall.Kill(0, syscall.SIGSTOP)
// on resume...
return "", nil
}