On Thu, Apr 30, 2009 at 8:20 AM, Bill5107 <[email protected]> wrote:
>
> I want to be able to control startup and shutdown of my TG2 app on
> Windows.
>
> Currently I simply use  "paster serve myapp.ini"  to start the server,
> but what is the best way to terminate it? Either from within the tgapp
> or externally?
>
I'm not sure about the behavior of it on windows, but on linux paster
serve --daemon will create a paster.pid file which you can later use
as kill `cat paster.pid` which is the same as doing ctrl-C on the CLI.

> I need something programatic, so hitting ctrl-C is not a viable
> option. I didn't see anything in the paster docs and I had nothing to
> lose so I tried to I raise KeyboardInterrupt or call sys.exit() from a
> controller.  All I get is a web-presented traceback and the server
> continues(of course :-) ).
>
This is a topic I have wanted to  work on for some time but I havent'
had the time. Ideally we should have some sort of way of writing a
controller that will allow you to shut down the server. But it gets
tricky as there is no way to shut it back on. So I guess we'll
probably need a standalone tgapp to restart the tg app. Suggestions
are welcome :)

> Thanks in advance.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to