sailorproject / sailor

A Lua MVC Web Framework.
MIT License
921 stars 125 forks source link

Cannot quit server with CTRL-C / OS X #85

Closed louis77 closed 6 years ago

louis77 commented 8 years ago

When I run Sailor in OS X Terminal with lua start-server.lua there is no way to quit, CTRL-C doesn't work.

The only way to get out of the process is by putting it into the backgroup (CTRL-Z) and killing the process manually (kill -9).

xspager commented 8 years ago

Have you tried, CTRL-C twice? This is Lua interpreter behavior.

louis77 commented 8 years ago

I've tried twice and more, didn't work. But I found out that to exit Sailor I can press CTRL-C, then make a request in the browser and Sailor will exit. It's a bit annoying. Is there no other way to catch CTRL-C signal?

malachaifrazier commented 8 years ago

@louis77 perhaps this is what you're looking for? It should add Signal handlers using lua-ev http://stackoverflow.com/a/19800506