On Wed, Oct 27, 2010 at 5:48 PM, Alexander Gladysh <aglad...@gmail.com> wrote:
>>> I'm running a single-handler wsapi site with
>>>
>>>        wsapi.fastcgi.run(function(...)
>>>           -- do something
>>>        end)
>>>
>>> Now I want to be able to shutdown gracefully.
>>>
>>> Can I tell something to wsapi so it will just exit its loop?
>
>> Right now there is no way to do that, sorry...
>
> I see. Is it hard to add a way to do this?
>
> Alexander.

Not really, I would just need a "please exit" WSAPI response, and, in
wsapi.fastcgi's case, this would make it close the lfcgi pipe and exit
the accept loop. But the probem would be making sure your web server
is honoring that, some servers would just respawn the process on the
next request...

For fastcgi, PA's suggestion of os.exit is actually quite good, as it
would not leak any resources.

--
Fabio Mascarenhas

_______________________________________________
Kepler-Project mailing list
Kepler-Project@lists.luaforge.net
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/

Reply via email to