2023-12-11 15:48:14 +00:00
|
|
|
//go:build !windows
|
|
|
|
|
|
|
|
package readline
|
|
|
|
|
|
|
|
import (
|
|
|
|
"syscall"
|
|
|
|
)
|
|
|
|
|
|
|
|
func handleCharCtrlZ(fd int, termios *Termios) (string, error) {
|
|
|
|
if err := UnsetRawMode(fd, termios); err != nil {
|
|
|
|
return "", err
|
|
|
|
}
|
|
|
|
|
2023-12-15 22:07:34 +00:00
|
|
|
_ = syscall.Kill(0, syscall.SIGSTOP)
|
2023-12-11 15:48:14 +00:00
|
|
|
|
|
|
|
// on resume...
|
|
|
|
return "", nil
|
|
|
|
}
|