Re: [Cppcms-users] Can cmake restart the cppcms server?
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2012-02-02 07:51:41
|
> From: "ele...@ex..." <ele...@ex...> > >Hi, > >One thing that is slightly annoying when compiling a project is having to >restart the server after every little change. Is there anyway to make >cmake automatically "killall -HUP appname" the server process after every >successful recompile? > >Cheers, >Petr > > See, unlike web server that can "re-read" its configuration on -HUP signal, you should actually reload executable after recompilation - replace it. You can do this easily with a simple script: while ./myapp -c myconfig ; do sleep 0.5 ; done And when you kill it by killall -TERM myapp It would restart automatically. while ./myapp is needed to prevent infinite restart in case myapp exists with error code. ------------------ If you change only views (templates) and you compile them as independent shared object you can reload them by setting an option: views.auto_reload in cppcms configuration to true. See: <http://cppcms.com/wikipp/en/page/cppcms_1x_config#views.auto_reload> This would make cppcms to reload shared object views automatically in case they had changed. This is useful for HTML/templates editing. Artyom Beilis ------------- Support CppCMS by donating money: https://sourceforge.net/donate/index.php?group_id=209965 |