dtsession: don't exit while processing your own session exit event.

Setup a global that protects against accidentally exiting
while doing session exit related housekeeping.
This commit is contained in:
Jon Trulson
2012-07-12 13:09:22 -06:00
parent 23930d1b35
commit dc5d68afba
4 changed files with 31 additions and 6 deletions

View File

@@ -2564,12 +2564,19 @@ void
SmExit (
int exitStatus)
{
if (smXSMP.saveState.saveComplete &&
smXSMP.saveState.shutdown &&
!smXSMP.saveState.shutdownCanceled)
XSMPExit ();
exit (exitStatus);
/* JET - needed to rework this to avoid exiting before we are
* *really* ready to
*/
if (smGD.ExitComplete)
{
if (smXSMP.saveState.saveComplete &&
smXSMP.saveState.shutdown &&
!smXSMP.saveState.shutdownCanceled)
XSMPExit ();
exit(exitStatus);
}
else
return;
}
void