/* https://github.com/itay-grudev/SingleApplication/issues/40 * SingleApplication doesn't work when two processes are started with millisecond delay * * To reproduce: run the app twice with './test/singleapp & ./test/singleapp' */ #include <QCoreApplication> #include <QDebug> #include <QTimer> #include <singleapplication.h> int main(int argc, char *argv[]) { SingleApplication app(argc, argv); qDebug() << "process started, pid:" << QCoreApplication::applicationPid(); QTimer::singleShot(3000, &app, SLOT(quit())); return app.exec(); }