[Interest] proper (silent) exit in response to SIGHUP - and signal/slot serialisation?
René J. V. Bertin
rjvbertin at gmail.com
Sat Oct 20 11:31:08 CEST 2018
Thiago Macieira wrote:
>> delivered. I can fix that by forcing a Qt::DirectConnection, which seems to
>> be signal safe (according to a sig_atomic_t state "inSignalHandler" var)
>> but is it?
>
> QMetaObject::activate() locks a mutex, so it's not async-signal-safe. That
> means you cannot emit a Qt signal from your Unix signal handler.
Yeah, I got things confused there. Again. Of course the Qt signal isn't sent
from within the signal handler.
So concretely, if I really wanted to call the slot before a previous call
finished I'd have to use a 2nd QSocketNotifier, possibly even watching a second
pipe?
More information about the Interest
mailing list