aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-08-02 11:15:30 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-08-02 11:15:30 +0100
commitdf6c652a15f43c187de52e57735e250ccd2c0b47 (patch)
tree66e6cc4cb81dfad67454024c4db3337f720bf376
parentf187d23f35719057ebe8f788f4a12a9d13034d0b (diff)
downloadxen-df6c652a15f43c187de52e57735e250ccd2c0b47.tar.gz
xen-df6c652a15f43c187de52e57735e250ccd2c0b47.tar.bz2
xen-df6c652a15f43c187de52e57735e250ccd2c0b47.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> xen-unstable changeset: 21797:c18f43ed379e xen-unstable date: Wed Jul 14 16:36:47 2010 +0100
-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'",