forked from enlightenment/efl
ecore-drm: Fix trapping of SIGUSR1 for VT switching signals
SIGUSR1 is used here to catch VT switching and either acquire or release the VT. The problem is that XWayland Also sends SIGUSR1 when it has finished initializing. In order to not get confused about where the SIGUSR1 came from we can check the pid inside the siginfo structure and see if it matches. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
d1c583d30c
commit
ff5bac5e6e
|
@ -17,11 +17,13 @@ _ecore_drm_tty_cb_signal(void *data, int type EINA_UNUSED, void *event)
|
|||
{
|
||||
Ecore_Drm_Device *dev;
|
||||
Ecore_Event_Signal_User *ev;
|
||||
siginfo_t sigdata;
|
||||
|
||||
dev = data;
|
||||
ev = event;
|
||||
|
||||
DBG("Caught user signal: %d", ev->number);
|
||||
sigdata = ev->data;
|
||||
if (sigdata.si_pid != getpid()) return ECORE_CALLBACK_RENEW;
|
||||
|
||||
if (ev->number == 1)
|
||||
{
|
||||
|
@ -83,7 +85,7 @@ _ecore_drm_tty_cb_signal(void *data, int type EINA_UNUSED, void *event)
|
|||
ERR("Could not acquire VT: %m");
|
||||
}
|
||||
|
||||
return EINA_TRUE;
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
|
|
Loading…
Reference in New Issue