readline_unix.go 273 B

123456789101112131415161718
  1. //go:build !windows
  2. package readline
  3. import (
  4. "syscall"
  5. )
  6. func handleCharCtrlZ(fd int, termios *Termios) (string, error) {
  7. if err := UnsetRawMode(fd, termios); err != nil {
  8. return "", err
  9. }
  10. _ = syscall.Kill(0, syscall.SIGSTOP)
  11. // on resume...
  12. return "", nil
  13. }