octruntime.swg: do not use atexit() to quit Octave
- This reverts commit 931656bcbe7c2bf37bb5d831b47fab9a38695e91
- Since atexit() does not pass along the desired exit status,
__swig_atexit__() always exits with status zero, regardless
of whether Octave completed successfully or raised an error.
- This means the success/failure of Octave scripts which load
SWIG modules cannot be determined by other programs, which
makes them unusable.
- Instead, provide a Octave function swig_exit() which calls
::_Exit() with a given exit status. This way at least a
clean exit from Octave can be guaranteed for future versions
if the seg-fault problem is not fixed.
1 file changed