src/lib/testutils/Makefile
src/lib/testutils/testdata/Makefile
src/lib/util/io/Makefile
- src/lib/util/io/tests/Makefile
src/lib/util/Makefile
src/lib/util/python/doxygen2pydoc.py
src/lib/util/python/gen_wiredata.py
b10_dhcp4_LDADD += $(top_builddir)/src/lib/config/libkea-cfgclient.la
b10_dhcp4_LDADD += $(top_builddir)/src/lib/cc/libkea-cc.la
b10_dhcp4_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
-b10_dhcp4_LDADD += $(top_builddir)/src/lib/util/io/libkea-util-io.la
b10_dhcp4dir = $(pkgdatadir)
b10_dhcp4_DATA = dhcp4.spec
configuration.
The signal handler for SIGHUP (also for SIGTERM and SIGINT) are installed in the
-kea_controller.cc using the @c isc::util::io::SignalSet class. The
+kea_controller.cc using the @c isc::util::SignalSet class. The
@c isc::dhcp::Dhcp6Srv calls @c isc::dhcp::Daemon::handleSignal on each pass
through the main loop. This method fetches the last received signal and calls
a handler function defined in the kea_controller.cc. The handler function
// Set signal handlers. When the SIGHUP is received by the process
// the server reconfiguration will be triggered. When SIGTERM or
// SIGINT will be received, the server will start shutting down.
- signal_set_.reset(new isc::util::io::SignalSet(SIGINT, SIGHUP, SIGTERM));
+ signal_set_.reset(new isc::util::SignalSet(SIGINT, SIGHUP, SIGTERM));
// Set the pointer to the handler function.
signal_handler_ = signalHandler;
b10_dhcp6_LDADD += $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/log/libkea-log.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/util/libkea-util.la
-b10_dhcp6_LDADD += $(top_builddir)/src/lib/util/io/libkea-util-io.la
b10_dhcp6_LDADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
b10_dhcp6dir = $(pkgdatadir)
configuration.
The signal handler for SIGHUP (also for SIGTERM and SIGINT) are installed in the
-kea_controller.cc using the @c isc::util::io::SignalSet class. The
+kea_controller.cc using the @c isc::util::SignalSet class. The
@c isc::dhcp::Dhcp6Srv calls @c isc::dhcp::Daemon::handleSignal on each pass
through the main loop. This method fetches the last received signal and calls
a handler function defined in the kea_controller.cc. The handler function
// Set signal handlers. When the SIGHUP is received by the process
// the server reconfiguration will be triggered. When SIGTERM or
// SIGINT will be received, the server will start shutting down.
- signal_set_.reset(new isc::util::io::SignalSet(SIGINT, SIGHUP, SIGTERM));
+ signal_set_.reset(new isc::util::SignalSet(SIGINT, SIGHUP, SIGTERM));
// Set the pointer to the handler function.
signal_handler_ = signalHandler;
}
libkea_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
libkea_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/log/libkea-log.la
libkea_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/util/libkea-util.la
-libkea_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/util/io/libkea-util-io.la
libkea_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/cc/libkea-cc.la
libkea_dhcpsrv_la_LIBADD += $(top_builddir)/src/lib/hooks/libkea-hooks.la
// PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
-#include <util/io/signal_set.h>
+#include <util/signal_set.h>
#include <boost/noncopyable.hpp>
#include <string>
/// is assigned to the static object in @c Daemon::init function.
///
/// Classes derived from @c Daemon may install custom signal handlers using
-/// @c isc::util::io::SignalSet class. This base class provides a declaration
+/// @c isc::util::SignalSet class. This base class provides a declaration
/// of the @c SignalSet object that should be initialized in the derived
/// classes to install the custom exception handlers.
///
///
/// This function provides a default implementation for the function
/// handling next signal received by the process. It checks if a pointer
- /// to @c isc::util::io::SignalSet object and the signal handler function
+ /// to @c isc::util::SignalSet object and the signal handler function
/// have been set. If they have been set, the signal handler is invoked for
/// the the next signal registered in the @c SignalSet object.
///
/// This pointer needs to be initialized to point to the @c SignalSet
/// object in the derived classes which need to handle signals received
/// by the process.
- isc::util::io::SignalSetPtr signal_set_;
+ isc::util::SignalSetPtr signal_set_;
/// @brief Pointer to the common signal handler invoked by the handleSignal
/// function.
/// This pointer needs to be initialized to point to the signal handler
/// function for signals being handled by the process. If signal handler
/// it not initialized, the signals will not be handled.
- isc::util::io::SignalHandler signal_handler_;
+ isc::util::SignalHandler signal_handler_;
private:
libkea_util_la_SOURCES += memory_segment_mapped.h memory_segment_mapped.cc
endif
libkea_util_la_SOURCES += range_utilities.h
+libkea_util_la_SOURCES += signal_set.cc signal_set.h
libkea_util_la_SOURCES += hash/sha1.h hash/sha1.cc
libkea_util_la_SOURCES += encode/base16_from_binary.h
libkea_util_la_SOURCES += encode/base32hex.h encode/base64.h
-SUBDIRS = . tests
+SUBDIRS = .
AM_CXXFLAGS = $(B10_CXXFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
lib_LTLIBRARIES = libkea-util-io.la
libkea_util_io_la_SOURCES = fd.h fd.cc fd_share.h fd_share.cc
libkea_util_io_la_SOURCES += socketsession.h socketsession.cc sockaddr_util.h
-libkea_util_io_la_SOURCES += signal_set.cc signal_set.h
libkea_util_io_la_SOURCES += pktinfo_utilities.h
libkea_util_io_la_LIBADD = $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
+++ /dev/null
-SUBDIRS = .
-
-AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
-AM_CPPFLAGS += $(BOOST_INCLUDES)
-AM_CXXFLAGS = $(B10_CXXFLAGS)
-
-if USE_STATIC_LINK
-AM_LDFLAGS = -static
-endif
-
-CLEANFILES = *.gcno *.gcda
-
-TESTS_ENVIRONMENT = \
- $(LIBTOOL) --mode=execute $(VALGRIND_COMMAND)
-
-TESTS =
-if HAVE_GTEST
-TESTS += run_unittests
-run_unittests_SOURCES = run_unittests.cc
-run_unittests_SOURCES += signal_set_unittest.cc
-
-run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
-run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
-
-run_unittests_LDADD = $(top_builddir)/src/lib/exceptions/libkea-exceptions.la
-run_unittests_LDADD += $(top_builddir)/src/lib/util/io/libkea-util-io.la
-run_unittests_LDADD += $(GTEST_LDADD)
-
-endif
-
-noinst_PROGRAMS = $(TESTS)
+++ /dev/null
-// Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
-//
-// Permission to use, copy, modify, and/or distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-// PERFORMANCE OF THIS SOFTWARE.
-
-#include <log/logger_support.h>
-#include <gtest/gtest.h>
-
-int
-main(int argc, char* argv[]) {
- ::testing::InitGoogleTest(&argc, argv);
- int result = RUN_ALL_TESTS();
- return (result);
-}
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
-#include <util/io/signal_set.h>
+#include <util/signal_set.h>
#include <cerrno>
#include <list>
using namespace isc;
-using namespace isc::util::io;
+using namespace isc::util;
namespace {
namespace isc {
namespace util {
-namespace io {
SignalSet::SignalSet(const int sig0) {
add(sig0);
}
}
-} // end of isc::util::io
} // end of isc::util
} // end of isc
namespace isc {
namespace util {
-namespace io {
/// @brief Exception thrown when the @c isc::util::io::SignalSet class
/// experiences an error.
std::set<int> local_signals_;
};
-}
}
}
run_unittests_SOURCES += strutil_unittest.cc
run_unittests_SOURCES += time_utilities_unittest.cc
run_unittests_SOURCES += range_utilities_unittest.cc
+run_unittests_SOURCES += signal_set_unittest.cc
run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
run_unittests_LDFLAGS = $(AM_LDFLAGS) $(GTEST_LDFLAGS)
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
-#include <util/io/signal_set.h>
+#include <util/signal_set.h>
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>
#include <gtest/gtest.h>
namespace {
using namespace isc;
-using namespace isc::util::io;
+using namespace isc::util;
-/// @brief Test fixture class for @c isc::util::io::SignalSet class.
+/// @brief Test fixture class for @c isc::util::SignalSet class.
///
/// This class contains a handler function which records the signal
/// being handled. It allows for checking whether the signal set