2023-12-11 15:48:14 +00:00
|
|
|
//go:build !windows
|
|
|
|
|
|
|
|
package readline
|
|
|
|
|
|
|
|
import (
|
|
|
|
"syscall"
|
|
|
|
)
|
|
|
|
|
2024-05-22 16:00:38 +00:00
|
|
|
func handleCharCtrlZ(fd uintptr, termios any) (string, error) {
|
2024-02-15 05:28:35 +00:00
|
|
|
t := termios.(*Termios)
|
|
|
|
if err := UnsetRawMode(fd, t); err != nil {
|
2023-12-11 15:48:14 +00:00
|
|
|
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
|
|
|
|
}
|