diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2014-10-14 16:44:29 -0400 | 
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2014-10-14 16:44:29 -0400 | 
| commit | 3920d946c6ef0259d113801fb48f1bc176516fee (patch) | |
| tree | 5dd02a8e70e70ffc8d960ee7fff434ef2b34d094 | |
| parent | 4607df13b96a79d702dd1848b4d435f5831eb622 (diff) | |
Introduce fast_exit() wrapper for _exit() so we can boost::bind() it.
| -rwxr-xr-x | indra/newview/llappviewer.cpp | 17 | 
1 files changed, 13 insertions, 4 deletions
| diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3a5008507a..b44f54f59c 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -745,6 +745,15 @@ public:  	}  }; +namespace { +// With Xcode 6, _exit() is too magical to use with boost::bind(), so provide +// this little helper function. +void fast_exit(int rc) +{ +	_exit(rc); +} +} +  bool LLAppViewer::init()  {	  	setupErrorHandling(mSecondInstance); @@ -801,10 +810,10 @@ bool LLAppViewer::init()  	S32 rc(gSavedSettings.getS32("QAModeTermCode"));  	if (rc >= 0)  	{ -		// QAModeTermCode set, terminate with that rc on LL_ERRS. Use _exit() -		// rather than exit() because normal cleanup depends too much on -		// successful startup! -		LLError::setFatalFunction(boost::bind(_exit, rc)); +		// QAModeTermCode set, terminate with that rc on LL_ERRS. Use +		// fast_exit() rather than exit() because normal cleanup depends too +		// much on successful startup! +		LLError::setFatalFunction(boost::bind(fast_exit, rc));  	}      mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling")); | 
