Re: [Cppcms-users] some graceful way to close the CppCMS app
Brought to you by:
artyom-beilis
From: augustin <aug...@ov...> - 2012-07-03 07:52:09
|
Cool. I had wondered how to do precisely that, before. With thanks: http://cppcms.com/wikipp/en/page/cppcms_1x_reload_application > static cppcms::service *srv; > static bool got_sighup; This is in the global namespace, right? > handler() > { > got_sighup = true; > the_service->shutdown(); You probably mean: srv->shutdown() ? > And in main() > > > while(1) { > cppcms::service srv(...) > srv.run(); > if(got_sighup) { > got_sighup = false; > continue; > } > break; > } Augustin. -- Friends: http://www.reuniting.info/ My projects: http://astralcity.org/ http://lesenjeux.fr/ http://linux.overshoot.tv/ http://overshoot.tv/ http://charityware.info/ http://masquilier.org/ http://openteacher.info/ http://minguo.info/ http://jacqueslemaire.fr/ http://www.wechange.org/ http://searching911.info/ . |