billiob pushed a commit to branch master.

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

commit cf1a9a3a015d6658a6777b24ef53eb271a0b4f28
Author: Boris Faure <bill...@gmail.com>
Date:   Mon Feb 23 23:29:59 2015 +0100

    verify that tcgetattr() does not fail
---
 src/bin/termpty.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index 56fbd7f..107b0de 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -387,7 +387,11 @@ termpty_new(const char *cmd, Eina_Bool login_shell, const 
char *cd,
         }
 
 
-   tcgetattr(ty->slavefd, &t);
+   if (tcgetattr(ty->slavefd, &t) < 0)
+     {
+        ERR("unable to tcgetattr: %s", strerror(errno));
+        goto err;
+     }
    t.c_cc[VERASE] =  (erase_is_del) ? 0x7f : 0x8;
 #ifdef IUTF8
    t.c_iflag |= IUTF8;

-- 


Reply via email to