diff --git a/src/testserver.c b/src/testserver.c index 6ab1d81..e772dca 100644 --- a/src/testserver.c +++ b/src/testserver.c @@ -54,16 +54,25 @@ int main(int argc, char **argv) { struct termios t; if (ptsname_r(info.fd, name, sizeof(name)) < 0) { + fprintf(stderr, "%s: %s: %s: %s\n", + argv[0], argv[1], "ptsname_r()", strerror(errno)); + goto error_open; } if (tcgetattr(info.fd, &t) < 0) { + fprintf(stderr, "%s: %s: %s: %s\n", + argv[0], argv[1], "tcgetattr()", strerror(errno)); + goto error_open; } cfmakeraw(&t); if (tcsetattr(info.fd, TCSANOW, &t) < 0) { + fprintf(stderr, "%s: %s: %s: %s\n", + argv[0], argv[1], "tcsetattr()", strerror(errno)); + goto error_open; }