billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=cfdab5a2afbbedf1f8ec80b8b85e6f352c81131f

commit cfdab5a2afbbedf1f8ec80b8b85e6f352c81131f
Author: Boris Faure <bill...@gmail.com>
Date:   Thu Jan 7 22:23:15 2021 +0100

    termpty: avoid ERR on exit of shell when keeping screen opened
---
 src/bin/termpty.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index 383f39e..60497aa 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -220,8 +220,9 @@ _pty_size(Termpty *ty)
    sz.ws_row = ty->h;
    sz.ws_xpixel = 0;
    sz.ws_ypixel = 0;
-   if (ioctl(ty->fd, TIOCSWINSZ, &sz) < 0)
-     ERR(_("Size set ioctl failed: %s"), strerror(errno));
+   if (ty->fd >= 0)
+     if (ioctl(ty->fd, TIOCSWINSZ, &sz) < 0)
+       ERR(_("Size set ioctl failed: %s"), strerror(errno));
 }
 
 static Eina_Bool

-- 


Reply via email to