Boost logo

Boost Users :

Subject: Re: [Boost-users] [Asio] signal_set not blocking/queueing signals on shutdown (Slava)
From: Marat Abrarov (abrarov_at_[hidden])
Date: 2014-01-16 06:33:07


> >> I've written an io_service+signal_set signal handling implementation
> >> in a thread of my application that triggers an orderly shutdown when
> >> (among other things) the user presses Ctrl+C.
> >>
>
> I first hear about asio signals, but I believe purpose of these signal
> facility in asio is only to help you to implement *waiting* for signals,
> like SIGCHLD, or SIGUSR{12}, whateverer you may choose for your IPC
> communication. You should not misuse asio for general signal handling.
> Normally signals are instantaneous things to be delivered right now right
> here without any regard in which state the target is.

I personally agree with Benjamin and think that the main goal of
asio::signal_set is to provide the Asio way to handle signals. Look at the
Asio examples
(http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio/examples/cpp03_exa
mples.html) - the "HTTP Servers" series. They use asio::signal_set for the
same goal/reason as Benjamin does.

Regards,
Marat Abrarov.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net