I wrote a simple multithreaded application in C++11
on Linux platform and I would like to terminate the server and its running threads by sending SIGINT
signal.
Obviously my server application uses thread support from C++11 (std::thread
etc.). Although I found some support for signal handling in C++11 (std::signal
), I couldn't find any support for handling signals in multithreaded environment.
So my question is - is there any way how to handle signals in multithreaded application in C++11
or do I have to rely back on pthreads
just because my application needs to deal with signals?