on xenial help sign in
Fix the run.sh script - pretend to be running with qtmir and emit SIGSTOP at the right time
ddb4aafGerry Boland
src/main.cpp+7
@@ -26,6 +26,7 @@
26#include <QLibrary>
26#include <QLibrary>
27#include <QDebug>
27#include <QDebug>
28#include <libintl.h>
28#include <libintl.h>
29+#include <signal.h>
29
30
30// local
31// local
31#include <paths.h>
32#include <paths.h>
@@ -140,6 +141,12 @@ Load the testability driver");
140 view->setSource(source);
141 view->setSource(source);
141 QObject::connect(view->engine(), SIGNAL(quit()), application, SLOT(quit()));
142 QObject::connect(view->engine(), SIGNAL(quit()), application, SLOT(quit()));
142
143
144+ if (!isMirServer && !qgetenv("UNITY_MIR_EMITS_SIGSTOP").isEmpty()) {
145+ // Emit SIGSTOP as expected by upstart, under Mir it's qtmir that will raise it.
146+ // see http://upstart.ubuntu.com/cookbook/#expect-stop
147+ raise(SIGSTOP);
148+ }
149+
143 if (isMirServer || parser.isSet(fullscreenOption)) {
150 if (isMirServer || parser.isSet(fullscreenOption)) {
144 view->showFullScreen();
151 view->showFullScreen();
145 } else {
152 } else {