hi,
I try to intercept real-time signals (SIGMIN + 1, SIGMIN +2 ...) it works when I send a signal (kill -35 PID)
it
works well only if i send one signal, when i send another signal or
same signal second time (kill -35 PID) the pogram does not intercept
the signal
I feel that run () stops the service after having received the first signal
Thank you for your help, Here are the code:
#define SIG1 (SIGRTMIN + 1)
#define SIG1 (SIGRTMIN + 2)
...
class Agent {
...
signal_handler(const boost::system::error_code& error, int signal_number) {...}
...
}
...
boost::asio::signal_set signals(io_serv);
signals.add(SIG1)
signals.add(SIG2)
...
signals.async_wait( boost::bind(&Agent::signal_handler, this, boost::asio::placeholders::error, boost::asio::placeholders::signal_number));
io_serv.run();
for (;;) {
std::this_thread::yield();
}
(I use Linux and g++)
--
Merci d'avance
Halim DJERROUD