diff options
author | Arthur Williams <taaparthur@disroot.org> | 2022-10-14 20:59:54 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-10-16 19:49:43 +0000 |
commit | 0ea1ec1ed445235cdba9e54e71023d5a82feed6b (patch) | |
tree | df6349013225f20c968cd18a02a3bbd873eb839b /xinit.c | |
parent | 60389ce90f552d9dfef8facf0efaf48efa59d93c (diff) |
Don't wait for X to finish starting if it has died
On my setup, when X first starts there aren't any screens available so
it immediately dies. Half a second later, screens become available but
xinit would still be waiting for the dead X process to signal that it
is ready. It'll take 15s for it to timeout and respawn X.
This patch makes xinit listen for its child's death and if X dies, it'll
immediately stop waiting for it to finish starting and attempt to start
it again.
Diffstat (limited to 'xinit.c')
-rw-r--r-- | xinit.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -263,7 +263,6 @@ main(int argc, char *argv[]) /* * Start the server and client. */ - signal(SIGCHLD, SIG_DFL); /* Insurance */ /* Let those signal interrupt the wait() call in the main loop */ memset(&sa, 0, sizeof sa); @@ -284,6 +283,7 @@ main(int argc, char *argv[]) sigaction(SIGALRM, &si, NULL); sigaction(SIGUSR1, &si, NULL); + sigaction(SIGCHLD, &si, NULL); #ifdef __APPLE__ #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 |