Fix doc on unix signal handlers
-
Hey,
The documentation "Calling Qt Functions From Unix Signal Handlers":http://qt-project.org/doc/qt-4.8/unix-signals.html contains a potential bug. The structures @struct sigaction hup, term;@
are initialized on the stack, and it can result later to a stack corruption. For instance, my main was basically
@int main(int argc, char* argv[]){
setup_unix_signal_handlers(); QApplication app(argc, argv); MyWidget w; w.show(); app.exec();
}@
I catched SIGTERM to call exit but it was crashing on some occasions. I later found through valgrind that it crashed on the release version of the app and not on the debug one.