[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [PATCH] Lua Leak in OS Library
- From: Matthew Paul Del Buono <delbu9c1@...>
- Date: Sun, 6 Sep 2009 18:46:59 -0400 (EDT)
>If a Lua script wants to exit
>cleanly, it should return from its main chunk. If it wants to
>quickly, it should call os.exit().
Unfortunately, this is not always a suitable situation. For
example, one place where I use Lua scripts a lot is in SVN post-
commit hooks where I need the ability to have the Lua
interpreter return a non-zero status code. I use os.exit() to do
this; the only other way to get a non-zero status at exit would
be to throw an uncaught error, which results in messages
appearing client-side which looks like a server error instead of
a user error.