Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Register proper signal handler for SIGCHLD, and collect the Xorg's zombie in it. This has two effects: 1. The main loop can explicitly exit on Xorg termination, not only via receiving EOF on the socket. 2. Due to not ignoring SIGCHLD anymore, accept() in mkghandles will also notice Xorg early exit and not wait indefinitely (it will fail with EINTR). For this case, improve error message. There is still a small race on startup, if Xorg exits before reaching accept() (or listen()) call. Handle this by checking just before accept() call. It isn't perfect (there is still a few instructions window where it wouldn't notice it in time), but it's good enough for practical purposes. QubesOS/qubes-issues#8060
- Loading branch information