mirror of https://gitee.com/namelin2022/ollama
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
269 B
19 lines
269 B
|
2 years ago
|
//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
|
||
|
|
}
|