This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] [xen-unstable] xenconsole: do not exit if a pty device i

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenconsole: do not exit if a pty device is missing
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Jul 2010 06:05:56 -0700
Delivery-date: Fri, 16 Jul 2010 06:08:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
# Date 1279121807 -3600
# Node ID c18f43ed379e3d1c56145b491107e32b94cafa50
# Parent  acd99661ba05e81e8734d2fb446d9645bacf4e07
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@xxxxxxxxxx>
 tools/console/client/main.c |    2 ++
 1 files changed, 2 insertions(+)

diff -r acd99661ba05 -r c18f43ed379e tools/console/client/main.c
--- a/tools/console/client/main.c       Wed Jul 14 16:36:23 2010 +0100
+++ b/tools/console/client/main.c       Wed Jul 14 16:36:47 2010 +0100
@@ -115,6 +115,8 @@ static int get_pty_fd(struct xs_handle *
                         * 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'", 

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xenconsole: do not exit if a pty device is missing, Xen patchbot-unstable <=