From 28e4901d041e087f505c19bc9733ef22d31addf0 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Mon, 19 Jan 2015 12:38:12 -0500 Subject: [PATCH] ecore-drm: Don't init tty unless we are Not using systemd Summary: It turns out we don't need to handle open & setup of the tty unless we are Not using systemd. This fixes an issue during enlightenment restart where we are unable to reopen the tty. @fix Signed-off-by: Chris Michael --- src/lib/ecore_drm/ecore_drm_launcher.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/lib/ecore_drm/ecore_drm_launcher.c b/src/lib/ecore_drm/ecore_drm_launcher.c index 41f2fe1b50..8b08e3ceb7 100644 --- a/src/lib/ecore_drm/ecore_drm_launcher.c +++ b/src/lib/ecore_drm/ecore_drm_launcher.c @@ -123,10 +123,15 @@ ecore_drm_launcher_connect(Ecore_Drm_Device *dev) } } - if (!ecore_drm_tty_open(dev, NULL)) + /* NB: Hmmm, appears we don't need to open a tty if we are running + * with systemd support */ + if (!logind) { - ERR("Launcher: failed to open tty\n"); - return EINA_FALSE; + if (!ecore_drm_tty_open(dev, NULL)) + { + ERR("Launcher: failed to open tty\n"); + return EINA_FALSE; + } } /* setup handler for signals */ @@ -153,8 +158,13 @@ ecore_drm_launcher_disconnect(Ecore_Drm_Device *dev) if (dev->tty.switch_hdlr) ecore_event_handler_del(dev->tty.switch_hdlr); dev->tty.switch_hdlr = NULL; - if (!ecore_drm_tty_close(dev)) - ERR("Launcher: failed to close tty\n"); + /* NB: Hmmm, appears we don't need to open a tty if we are running + * with systemd support */ + if (!logind) + { + if (!ecore_drm_tty_close(dev)) + ERR("Launcher: failed to close tty\n"); + } if (logind) {