C++ Logo

std-proposals

Advanced search

Re: Signals & Slots

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 26 Jul 2021 12:31:33 -0700
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.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering

Received on 2021-07-26 14:32:08