From 87f759dea0913d56c0b15741c144802f7954be7d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 14 Jul 2010 16:36:47 +0100 Subject: xenconsole: do not exit if a pty device is missing This can just mean we have raced with the bootloader exiting and if we continue we will likely see the real domain console show up. Signed-off-by: Ian Campbell --- tools/console/client/main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/console') 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'", -- cgit v1.2.3