Skip to content

Commit

Permalink
Make Crystal.main use exit
Browse files Browse the repository at this point in the history
  • Loading branch information
bew committed Dec 19, 2017
1 parent 49028a1 commit 2eec025
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/crystal/main.cr
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ module Crystal
GC.init

remember_blocking_state
at_exit { restore_blocking_state }

status =
begin
Expand All @@ -56,15 +57,9 @@ module Crystal
1
end

status = AtExitHandlers.run status

ex.inspect_with_backtrace STDERR if ex
STDOUT.flush
STDERR.flush

restore_blocking_state

status
exit status
end

# Main method run by all Crystal programs at startup.
Expand Down

0 comments on commit 2eec025

Please sign in to comment.