ollama/readline/readline_unix.go
Michael Yang f38353d6b9 stdin.fd
2024-06-04 11:13:30 -07:00

19 lines
291 B
Go

//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
}