e start - handle exit code for restart AND exit choices because of lib
so library somewhere is causing an exit(1) sometimes... this means i lose my entire desktop. this is not e doing it... so it's some dependency bug and this shouldn't happen - but it does and it causes the entire login session to be losst, so treat an exit code ofr 0 as a clean exit, and anything else as a bug to be handled like segfaults etc. and restart e.
This commit is contained in:
parent
609c79de1f
commit
e0227cf536
|
@ -814,7 +814,10 @@ not_done:
|
||||||
|
|
||||||
if (result == child)
|
if (result == child)
|
||||||
{
|
{
|
||||||
if (WIFSTOPPED(status) && !stop_ptrace)
|
printf("WIFSTOPPED=%i WIFEXITED=%i WEXITSTATUS=%i stop_ptrace=%i\n",
|
||||||
|
WIFSTOPPED(status), WIFEXITED(status),
|
||||||
|
WEXITSTATUS(status), stop_ptrace);
|
||||||
|
if (WIFSTOPPED(status) && (!stop_ptrace))
|
||||||
{
|
{
|
||||||
char *backtrace_str = NULL;
|
char *backtrace_str = NULL;
|
||||||
|
|
||||||
|
@ -855,14 +858,28 @@ not_done:
|
||||||
if (getenv("DISPLAY")) kill(child, SIGKILL);
|
if (getenv("DISPLAY")) kill(child, SIGKILL);
|
||||||
if (WEXITSTATUS(r) == 1) restart = EINA_FALSE;
|
if (WEXITSTATUS(r) == 1) restart = EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
else if (!WIFEXITED(status) || (stop_ptrace))
|
||||||
|
{
|
||||||
|
restart = EINA_TRUE;
|
||||||
|
done = EINA_TRUE;
|
||||||
|
}
|
||||||
else if (WEXITSTATUS(status) == 111)
|
else if (WEXITSTATUS(status) == 111)
|
||||||
{
|
{
|
||||||
putenv("E_RESTART_OK=1");
|
putenv("E_RESTART_OK=1");
|
||||||
restart = EINA_TRUE;
|
restart = EINA_TRUE;
|
||||||
done = EINA_TRUE;
|
done = EINA_TRUE;
|
||||||
}
|
}
|
||||||
else if (!WIFEXITED(status) || stop_ptrace)
|
else if (WEXITSTATUS(status) == 0)
|
||||||
done = EINA_TRUE;
|
{
|
||||||
|
restart = EINA_FALSE;
|
||||||
|
done = EINA_TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("Invalid exit from enlightenment: code=%i\n", WEXITSTATUS(status));
|
||||||
|
restart = EINA_TRUE;
|
||||||
|
done = EINA_TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (result == -1)
|
else if (result == -1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue