src\startshut\shutdown.c
file.
XShutdown starts two additional threads to close all the windows. This is described
in detail in the "XWorkplace Internals" section of the XWorkplace User Guide.
I have also tried to put plenty of comments into the sources.