In C++, can I use multithreading tools to synchronize UNIX signals with my main program?

Does a signal handler set with sigaction run in its own thread? Can I use Pthreads tools to synchronize my signal handler with my main program, like Pthreads mutexes? Can I use C++11 tools like mutex and atomic?

Sorry if the question is a bit too general but I’m really confused about the relation between signals and threads.

I’m working on Linux but the question applies to UNIX in general.

Source: c++

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.