handle race condition while setting raw mode in windows (#2509)

This commit is contained in:
Patrick Devine 2024-02-14 21:28:35 -08:00 committed by GitHub
parent 9241a29336
commit 42e77e2a69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 38 additions and 15 deletions

View file

@ -6,8 +6,9 @@ import (
"syscall"
)
func handleCharCtrlZ(fd int, termios *Termios) (string, error) {
if err := UnsetRawMode(fd, termios); err != nil {
func handleCharCtrlZ(fd int, termios any) (string, error) {
t := termios.(*Termios)
if err := UnsetRawMode(fd, t); err != nil {
return "", err
}