aboutsummaryrefslogtreecommitdiffstats
path: root/tools/console
diff options
context:
space:
mode:
Diffstat (limited to 'tools/console')
-rw-r--r--tools/console/client/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/console/client/main.c b/tools/console/client/main.c
index 840f08eec6..4289d361a6 100644
--- a/tools/console/client/main.c
+++ b/tools/console/client/main.c
@@ -115,6 +115,8 @@ static int get_pty_fd(struct xs_handle *xs, char *path, int seconds)
* disambiguate: just read the pty path */
pty_path = xs_read(xs, XBT_NULL, path, &len);
if (pty_path != NULL) {
+ if (access(pty_path, R_OK|W_OK) != 0)
+ continue;
pty_fd = open(pty_path, O_RDWR | O_NOCTTY);
if (pty_fd == -1)
err(errno, "Could not open tty `%s'",