C++ Logo

std-proposals

Advanced search

Re: Signals & Slots

From: Phil Bouchard <boost_at_[hidden]>
Date: Mon, 26 Jul 2021 15:51:37 -0400
One thing that could be done though is to provide a static conversion
function called explicitly that will convert these POSIX signals into
the new safer signal types. Just an idea...

On 7/26/21 3:31 PM, Thiago Macieira wrote:
> On Monday, 26 July 2021 12:27:16 PDT Phil Bouchard wrote:
>> What is messy with them is if a process receives a signal and the main
>> thread masks it then it will be forwarded to the first random thread not
>> masking it.
>>
>> Perhaps there is a solution to wrap them up or perhaps there is none; I
>> don't know yet.
> That is an issue that makes them messy, not the only one. You can't control
> the signal mask properly in a multithreaded application with lots of libraries
> because you can't be sure that some library didn't start an aux thread and
> unmasked the signal you want to catch.
>
> Especially if that signal is SIGCHLD, which must be cooperatively handled.
>
> THIS is what makes signalfd Dead On Arrival. It's unusable in a moderately
> complex application.
>
-- 
*Phil Bouchard*
Founder & CTO
C.: (819) 328-4743
Fornux Logo <http://www.fornux.com>

Received on 2021-07-26 14:51:42