Boost logo

Boost Users :

From: Martijn Otto (boost_at_[hidden])
Date: 2019-09-29 16:39:43


On Sun, 2019-09-29 at 12:57 +0200, Bjorn Reese via Boost-users wrote:
> On 9/26/19 8:52 AM, Martijn Otto via Boost-users wrote:
>
> > Now I want to be able to load a new certificate without restarting
> > the
> > process (minimizing downtime). For this I have implemented a signal
> > handler listening to SIGUSR1. This handler constructs a new ssl
> > context
> > and then move-assigns it to the ssl context variable in the main
> > function.
>
> Please notice that only syscalls marked as async-signal-safe may be
> used
> within a signal handler. Memory allocation is not async-signal-safe.
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users

That's interesting and good to know. I cannot find it anywhere in the
documentation for signal_set (
https://www.boost.org/doc/libs/1_71_0/doc/html/boost_asio/reference/signal_set.html
). My understanding has always been that this issue does not occur
using asio, since it will post() to the executor when a signal is
received, so the possibly unsafe code is not executed in the signal
handler the kernel sees.

Have I misunderstood this?


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