[RFC/WIP] call awesome_restart_delayed via main loop
Fixes `echo 'awesome.restart()' | awesome-client` to not display an error about failed dbus-send, caused by awesome restarting before replying through DBus.
This commit is contained in:
parent
36d7535cd5
commit
6f7e8e668e
11
awesome.c
11
awesome.c
|
@ -524,12 +524,19 @@ exit_on_signal(gpointer data)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static gboolean
|
||||||
awesome_restart(void)
|
awesome_restart_delayed(gpointer unused)
|
||||||
{
|
{
|
||||||
awesome_atexit(true);
|
awesome_atexit(true);
|
||||||
execvp(awesome_argv[0], awesome_argv);
|
execvp(awesome_argv[0], awesome_argv);
|
||||||
fatal("execv() failed: %s", strerror(errno));
|
fatal("execv() failed: %s", strerror(errno));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
awesome_restart(void)
|
||||||
|
{
|
||||||
|
g_idle_add_full(G_PRIORITY_DEFAULT, awesome_restart_delayed, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Function to restart awesome on some signals.
|
/** Function to restart awesome on some signals.
|
||||||
|
|
Loading…
Reference in New Issue