diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-07-30 14:29:46 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-30 14:29:46 -0700 |
commit | dd881bca9b8ec961046637b0efb763254e25dc10 (patch) | |
tree | 419ec7e9ac10b495cb0e910b2938edcb286db295 /src/library.js | |
parent | d69c8874a61b3b22722ace3d9922be472a5fca65 (diff) | |
parent | 908e87a0a6fa87c03108b627ee85592922b778fa (diff) |
Merge pull request #1444 from inolen/async_main
don't expect an exit status to be returned from run or callMain
Diffstat (limited to 'src/library.js')
-rw-r--r-- | src/library.js | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/library.js b/src/library.js index 893bd32a..b45ef8db 100644 --- a/src/library.js +++ b/src/library.js @@ -2133,20 +2133,7 @@ LibraryManager.library = { _exit: function(status) { // void _exit(int status); // http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html - - function ExitStatus() { - this.name = "ExitStatus"; - this.message = "Program terminated with exit(" + status + ")"; - this.status = status; - Module.print('Exit Status: ' + status); - }; - ExitStatus.prototype = new Error(); - ExitStatus.prototype.constructor = ExitStatus; - - exitRuntime(); - ABORT = true; - - throw new ExitStatus(); + Module['exit'](status); }, fork__deps: ['__setErrNo', '$ERRNO_CODES'], fork: function() { @@ -3929,8 +3916,7 @@ LibraryManager.library = { __cxa_atexit: 'atexit', abort: function() { - ABORT = true; - throw 'abort() at ' + (new Error().stack); + Module['abort'](); }, bsearch: function(key, base, num, size, compar) { |