diff options
author | Boris Faure <billiob@gmail.com> | 2015-02-23 23:29:59 +0100 |
---|---|---|
committer | Boris Faure <billiob@gmail.com> | 2015-02-23 23:33:01 +0100 |
commit | cf1a9a3a015d6658a6777b24ef53eb271a0b4f28 (patch) | |
tree | 8f0948254887d1c6d66b8d6c1be8b6494e4b75e6 /src | |
parent | ac12f8eec80a1d6c5f06a1f8f2096c618c77a06a (diff) |
verify that tcgetattr() does not fail
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/termpty.c | 6 |
1 files changed, 5 insertions, 1 deletions
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, | |||
387 | } | 387 | } |
388 | 388 | ||
389 | 389 | ||
390 | tcgetattr(ty->slavefd, &t); | 390 | if (tcgetattr(ty->slavefd, &t) < 0) |
391 | { | ||
392 | ERR("unable to tcgetattr: %s", strerror(errno)); | ||
393 | goto err; | ||
394 | } | ||
391 | t.c_cc[VERASE] = (erase_is_del) ? 0x7f : 0x8; | 395 | t.c_cc[VERASE] = (erase_is_del) ? 0x7f : 0x8; |
392 | #ifdef IUTF8 | 396 | #ifdef IUTF8 |
393 | t.c_iflag |= IUTF8; | 397 | t.c_iflag |= IUTF8; |