Has termios module set initial term to empty struct if error is encountered (non-tty situation)

master
sloum 2 years ago
parent d621c08b26
commit 43d6ba870c

@ -34,7 +34,7 @@ func getTermios() syscall.Termios {
var value syscall.Termios
err := ioctl(fd, getTermiosIoctl, uintptr(unsafe.Pointer(&value)))
if err != nil {
panic(err)
return syscall.Termios{} // This should only happen if called from a non-tty
}
return value
}

Loading…
Cancel
Save