Function to drain controlling tty

This commit is contained in:
Kovid Goyal
2023-01-23 16:07:00 +05:30
parent a009d6b258
commit cc1f0bc3fe
4 changed files with 29 additions and 3 deletions
+3 -1
View File
@@ -8,6 +8,8 @@ import (
"os"
"time"
"golang.org/x/sys/unix"
"kitty/tools/tty"
"kitty/tools/utils"
)
@@ -143,7 +145,7 @@ func write_to_tty(
wait_for_write_available := func() {
for {
n, err := selector.WaitForever()
if err != nil {
if err != nil && err != unix.EINTR {
err_channel <- err
keep_going = false
return