[RFC] Transform global variable really_exiting into static.

Transform global variable really_exiting into static and some minor style changes.

Comments are welcome.
Might as well put the comment on a single line.