readline_unix.go 269 Bytes
Newer Older
Bruce MacDonald's avatar
Bruce MacDonald committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//go:build !windows

package readline

import (
	"syscall"
)

func handleCharCtrlZ(fd int, termios *Termios) (string, error) {
	if err := UnsetRawMode(fd, termios); err != nil {
		return "", err
	}

	syscall.Kill(0, syscall.SIGSTOP)

	// on resume...
	return "", nil
}