billiob pushed a commit to branch master.

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

commit cd04b71611a4580d4d3cf70b6b60d841ffffa6d0
Author: Boris Faure <[email protected]>
Date:   Sat Jan 10 21:01:51 2015 +0100

    check tcsetattr()
---
 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 be4041d..7a3d710 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -392,7 +392,11 @@ termpty_new(const char *cmd, Eina_Bool login_shell, const 
char *cd,
 #ifdef IUTF8
    t.c_iflag |= IUTF8;
 #endif
-   tcsetattr(ty->fd, TCSANOW, &t);
+   if (tcsetattr(ty->fd, TCSANOW, &t) < 0)
+     {
+        ERR("unable to tcsetattr: %s", strerror(errno));
+        goto err;
+     }
 
    ty->hand_exe_exit = ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
                                                _cb_exe_exit, ty);

-- 


Reply via email to