#include <boost/bind.hpp>
-#ifdef HAVE_LIBI2NCOMMON
-# include <signalfunc.hpp>
-//# include <timefunc.hxx>
-#else
-#include <signal.h>
-#endif
+#include <asyncio_signalfunc.hpp>
#include <iostream>
/**
* initializes the struct with a given file descriptor and clears the event mask(s).
- * @param _fd
+ * @param _fd
*/
PollFd(int _fd)
{
case Direction::in:
{
int res= ::shutdown(m_read_fd, SHUT_RD);
- if (res<0)
+ if (res<0)
{
m_errno= errno;
}
/**
* returns if the output buffer is empty.
- * @return
+ * @return
*/
bool IOImplementation::empty() const
{
: m_count_active_loops(0)
, m_count_stop_requests(0)
{
-#ifdef HAVE_LIBI2NCOMMON
- SystemTools::ignore_signal( SystemTools::Signal::PIPE );
-#else
- signal( SIGPIPE, SIG_IGN );
-#endif
+ SystemTools::ignore_signal( SystemTools::Signal::PIPE );
} // eo Backend::Backend
Backend::~Backend()
{
-#ifdef HAVE_LIBI2NCOMMON
SystemTools::restore_signal_handler( SystemTools::Signal::PIPE );
-#else
- signal( SIGPIPE, SIG_DFL );
-#endif
} // eo Backend::~Backend()
/**
*
* @note this method is a little beast.
*
- * @internal
+ * @internal
* The cycle is divided into four steps: collecting; poll; mark and execute.
* The "mark" step is necessary to avoid some bad side effects when method calls in the execution stage
* are calling @a Backup::doOneStep or open their own local backend loop.
// TODO
for(internal_io::TimerList::iterator it_timer= internal_io::g_timer_list().begin();
- it_timer != internal_io::g_timer_list().end()
+ it_timer != internal_io::g_timer_list().end()
&& (!had_active_object || !min_event_time_set || current_time < min_event_time);
++ it_timer)
{
// and forward the exception
throw;
}
- }
+ }
while (0 == m_count_stop_requests);
--m_count_active_loops;
--m_count_stop_requests;