[Interest] proper (silent) exit in response to SIGHUP?

René J. V. Bertin rjvbertin at gmail.com
Fri Oct 12 15:11:16 CEST 2018


Giuseppe D'Angelo via Interest wrote:

> It's not safe. Emitting a signal with a queued invocation will allocate
> memory. So don't do it from a signal handler.

Ah yes,

 Qt needs to copy the arguments to store them in an event behind the scenes

Dang... I guess that would be QEvent::MetaCall? Is there a way to prepare that 
event beforehand and send it as a synthetic event it inside the event handler 
instead of doing an emit?

Not that I know if it's safe to UNlock a mutex or release a semaphore in a 
signal handler, but I'm a bit surprised that I can't find a class like 
QWaitCondition that emit a signal when the condition is met.

R.




More information about the Interest mailing list