Usually, the last client started in .xinitrc is the one used to shutdown X cleanly. For example, if the last command in .xinitrc is
twmthen killing the twm process will result in X shutting down.
However, if you need to immediately kill the X server for some reason,
you can use the key combination .