termpty: avoid ERR on exit of shell when keeping screen opened

This commit is contained in:
Boris Faure 2021-01-07 22:23:15 +01:00
parent b2b4c8cb18
commit cfdab5a2af
Signed by: borisfaure
GPG Key ID: 35C0410516166BE8
1 changed files with 3 additions and 2 deletions

View File

@ -220,8 +220,9 @@ _pty_size(Termpty *ty)
sz.ws_row = ty->h; sz.ws_row = ty->h;
sz.ws_xpixel = 0; sz.ws_xpixel = 0;
sz.ws_ypixel = 0; sz.ws_ypixel = 0;
if (ioctl(ty->fd, TIOCSWINSZ, &sz) < 0) if (ty->fd >= 0)
ERR(_("Size set ioctl failed: %s"), strerror(errno)); if (ioctl(ty->fd, TIOCSWINSZ, &sz) < 0)
ERR(_("Size set ioctl failed: %s"), strerror(errno));
} }
static Eina_Bool static Eina_Bool