xinit properly handles SIGINT, as well as SIGQUIT and SIGHUP. Unfortunately, it does not handle SIGTERM, but it should. Reason: I use xinit in /etc/inittab to automatically start an X Server in run-level 4. This works fine. If I switch to run-level 3 (telinit 3), init sends SIGTERM to xinit. xinit terminates, but does not kill the X Server (or any clients it started). So right now, the X server continues to run in level 3. The correct behaviour would be xinit to catch SIGTERM, and shutdown the X Server and clients.
Created attachment 1487 [details] [review] xinit.c: handle SIGTERM (similar to SIGQUIT etc.) I do not see a reason why handling SIGTERM would result in any problems. Comments?
applied to head, thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.