class MyContainer { private: std::vector<Foo> container; public: int removeFromContainer(Foo* aFoo) { // DO some stuff return RESULT_CODE; } int addToContainer(Foo* aFoo) { // DO some stuff return RESULT_CODE; } }; |
class MainClass { private: int member; public: void mainLoop(char* args) { signal(SIGCHLD, &signalHandler); } }; |
void static signalHandler_child(int p) { this->myContainerInstance->addToContainer(new Foo); } |
new Foo
in a signal handler. When the processing of the abstract machine is interrupted by receipt of a signal, the values of objects which are neither of type volatile std::sig_atomic_t nor lock-free atomic objects are unspecified during the execution of the signal handler, and the value of any object not in either of these two categories that is modified by the handler becomes undefined. - IS |
|
|