FAQ Database Discussion Community


handling sigterm in OSx

c++,osx,signals,sigterm
I have console C++ application built in XCode 6 and want to add SIGTERM handler to it. There are a lot of examples, but I can't get them to work. #include <csignal> namespace { volatile std::sig_atomic_t gDone = 0; } static void term_handler(int i) { gDone = 1; } int...