Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef ASIO_DETAIL_SIGNAL_INIT_HPP
00012 #define ASIO_DETAIL_SIGNAL_INIT_HPP
00013
00014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
00015 # pragma once
00016 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
00017
00018 #include "asio/detail/push_options.hpp"
00019
00020 #include "asio/detail/push_options.hpp"
00021 #include <boost/config.hpp>
00022 #include "asio/detail/pop_options.hpp"
00023
00024 #if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
00025
00026 #include "asio/detail/push_options.hpp"
00027 #include <csignal>
00028 #include "asio/detail/pop_options.hpp"
00029
00030 namespace asio {
00031 namespace detail {
00032
00033 template <int Signal = SIGPIPE>
00034 class signal_init
00035 {
00036 public:
00037
00038 signal_init()
00039 {
00040 std::signal(Signal, SIG_IGN);
00041 }
00042 };
00043
00044 }
00045 }
00046
00047 #endif // !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
00048
00049 #include "asio/detail/pop_options.hpp"
00050
00051 #endif // ASIO_DETAIL_SIGNAL_INIT_HPP