Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Fix doc on unix signal handlers
Forum Updated to NodeBB v4.3 + New Features

Fix doc on unix signal handlers

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aureshinite
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      messi
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved