From 7c5d269f259dd247c04a374467577cd47cc2cc27 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 2 Sep 2013 22:07:46 +0100 Subject: [PATCH] intel-virtual-overlay: Keep bumblebeed awake bumbledeed will shutdown its Xserver when the last connection to it closes. For the moment, leak the control socket so that the display stays alive. However, we will want to attach to any Xservers created by bumblebee as opposed to creating them. Signed-off-by: Chris Wilson --- tools/virtual.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/virtual.c b/tools/virtual.c index ec83701d..0a66725e 100644 --- a/tools/virtual.c +++ b/tools/virtual.c @@ -1686,7 +1686,6 @@ static int bumblebee_open(struct context *ctx) goto err; } buf[len] = '\0'; - close(fd); DBG(("%s query result '%s'\n", __func__, buf)); @@ -1698,6 +1697,13 @@ static int bumblebee_open(struct context *ctx) len++; buf[len] = '\0'; + /* XXX We must keep the control socket open whilst we want to keep + * the display around. + * + * So what we need to do is listen for new bumblee Xservers and + * bind only for their duration. + */ + return display_open(ctx, buf+7); err: