Also, removed threads for each pingchecker, leaving only one thread with one
io_service for all pingers. Tested that a lot with ICMP v4 pinger, but no other.
+
+If the system time is changed backwards, the pingchecker freezes, including its signal
+ handler (boost asio's deadline_timer seems to work with time points on a non-monotonic
+ clock). Change that! (apparently, boost asio 1.49 introduces a steady_timer, try that)
}
-/// called regularly from io_service; checks signal_data.signal_flag
+/**
+ * @brief called regularly from io_service; checks signal_data.signal_flag
+ *
+ * this does NOT work if there is a change in system time -- boost asio's
+ * deadline timers seem to operate on fixed time points on a non-monotonic
+ * clock;
+ *
+ * We therefore use external programs to kill pingchecker processes if the
+ * system clock changes; We use SIGHUP for this because it is not handled
+ * here and thus the default signal handler (which just kills the process
+ * without calling any destructors) avoids a freeze in here. SIGTERM would
+ * not work any more after system time change!
+ *
+ * --> do not catch SIGHUP in any asio-related signal handling!
+ */
void signal_checker( const boost::system::error_code &error )
{
bool want_stop = false;