diff options
author | Ian Jackson <Ian.Jackson@eu.citrix.com> | 2010-07-14 16:36:47 +0100 |
---|---|---|
committer | Ian Jackson <Ian.Jackson@eu.citrix.com> | 2010-07-14 16:36:47 +0100 |
commit | 87f759dea0913d56c0b15741c144802f7954be7d (patch) | |
tree | 62dba3b4210c1897a67764c24920251c25b51885 /tools/console | |
parent | dc04fe42de492095fa4900cde51e449fb280803e (diff) | |
download | xen-87f759dea0913d56c0b15741c144802f7954be7d.tar.gz xen-87f759dea0913d56c0b15741c144802f7954be7d.tar.bz2 xen-87f759dea0913d56c0b15741c144802f7954be7d.zip |
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 <ian.campbell@citrix.com>
Diffstat (limited to 'tools/console')
-rw-r--r-- | tools/console/client/main.c | 2 |
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'", |