Hello,
I use boost::asio for creating a daemon, I do this:
io::io_service l_ioservice;
io::signal_set l_signals(l_ioservice, SIGINT, SIGTERM);
l_signals.async_wait(daemonhandler);
l_ioservice.run();
my daemonhandler shows:
void daemonhandler( const boost::system::Error_code& err )
{
if (!err)
do some log
}
The daemon handler function is a function, that runs in a thread loop, does it?
Can I create something like:
void daemonhandler( const boost::system::Error_code& err )
{
if (!err)
do some log
else
do daemon work
}
My question is, is the daemonhandler function a function that is called only if the daemon is stopped or
that is run during the daemon is active / working?
Thanks
Phil