Skip to content
Permalink
Browse files

Merge pull request #221 from luvit/add-exit-code

luvit: add process.exitCode
  • Loading branch information...
philips committed May 14, 2012
2 parents 3fad442 + f2d1ae8 commit 5befa9155a9788e051e7059afe8165ca0d37f05e
Showing with 4 additions and 1 deletion.
  1. +3 −0 examples/exit-code.lua
  2. +1 −1 lib/luvit/luvit.lua
@@ -0,0 +1,3 @@
-- exit luvit with exit code 3 in the event of a pre-mature
-- event loop exit
process.exitCode = 3
@@ -313,4 +313,4 @@ end, traceback))
-- Start the event loop
native.run()
-- trigger exit handlers and exit cleanly
process.exit(0)
process.exit(process.exitCode or 0)

0 comments on commit 5befa91

Please sign in to comment.
You can’t perform that action at this time.