Fix doc on unix signal handlers

  • Hey,

    The documentation "Calling Qt Functions From Unix Signal Handlers": 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[]){

    QApplication app(argc, argv);
    MyWidget w;;


    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.

  • Have you tested it with the example from the doc?
    Please provide the exact code, so that it can be confirmed.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.