diff options
author | nicm <nicm> | 2017-01-20 14:02:33 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-01-20 14:02:33 +0000 |
commit | 46572ba904b0fb37e3a6848f292c07ff61280985 (patch) | |
tree | 9a7f104ef7e844b58bb6ee36cb9127bc54d9a681 /client.c | |
parent | faa05703091de29e5af06777513acd7a562433ba (diff) | |
download | rtmux-46572ba904b0fb37e3a6848f292c07ff61280985.tar.gz rtmux-46572ba904b0fb37e3a6848f292c07ff61280985.tar.bz2 rtmux-46572ba904b0fb37e3a6848f292c07ff61280985.zip |
Print error rather than fatal() if tcgetattr() fails, which is much more
useful to user.
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -313,8 +313,11 @@ client_main(struct event_base *base, int argc, char **argv, int flags, event_set(&client_stdin, STDIN_FILENO, EV_READ|EV_PERSIST, client_stdin_callback, NULL); if (client_flags & CLIENT_CONTROLCONTROL) { - if (tcgetattr(STDIN_FILENO, &saved_tio) != 0) - fatal("tcgetattr failed"); + if (tcgetattr(STDIN_FILENO, &saved_tio) != 0) { + fprintf(stderr, "tcgetattr failed: %s\n", + strerror(errno)); + return (1); + } cfmakeraw(&tio); tio.c_iflag = ICRNL|IXANY; tio.c_oflag = OPOST|ONLCR; |