Pressing Ctrl+Z does suspend the application, as in, it stops running until resumed with a SIGCONT (possibly sent through the fg
or bg
command in the shell). But…
You're running xinit
, not firefox
. Pressing Ctrl+Z sends a STOP signal to the application that's running in the foreground, not to other applications that it may have run. So you've only suspended xinit
itself, and this doesn't affect the X11 session.
More precisely, pressing Ctrl+Z sends a STOP signal to the foreground process group. This may involve more than one process, but the intent of process groups is that it's still morally a single unit for signalling purposes.
(The same holds for Ctrl+C and SIGINT, and Ctrl+\ and SIGQUIT. On the other hand, SIGHUP when the terminal disappears is only sent to a single process: the session leader, normally the shell; shells in turn send SIGHUP to the jobs they launched.)
xinit
runs both the X server and the client in their own process group, precisely so that you can suspend or kill it without killing the whole session. When you send it a catchable signal, it kills the X server, which in turns causes most X applications to exit — so pressing Ctrl+C does bring down the GUI session, but indirectly, not because every client and the server received a SIGINT due to the Ctrl+C. On the other hand, xinit
doesn't do anything particular on Ctrl+Z, so that just suspends xinit
and leaves the session alone, which is useful when you want to do something else in the terminal where you ran xinit
.