glogg icon indicating copy to clipboard operation
glogg copied to clipboard

Fix signal handler

Open elfring opened this issue 7 years ago • 1 comments

The function “exit” does not belong to the list of async-signal-safe functions. I guess that a different program design will be needed for your function “terminate”.

elfring avatar Aug 09 '18 09:08 elfring

As far as I understand one of correct solutions would be blocking selected signals on all threads (doing this in main should work by inheritance?) and then using separate thread with sigwait to wait for signals. This thread is not a signal handler, so calling regular exit should be permitted.

variar avatar Jan 21 '19 08:01 variar