diff options
author | Ken Moore <ken@ixsystems.com> | 2016-12-27 11:07:17 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2016-12-27 11:07:17 -0500 |
commit | 64012116a826c52c7c11e94a13309f246e3f5516 (patch) | |
tree | fdf780dc5f7724a70af2b7fa408594a4dfeec9f8 /src-qt5 | |
parent | Adjust the QMenu margins a bit more: use 2em for both the left and right marg... (diff) | |
download | lumina-64012116a826c52c7c11e94a13309f246e3f5516.tar.gz lumina-64012116a826c52c7c11e94a13309f246e3f5516.tar.bz2 lumina-64012116a826c52c7c11e94a13309f246e3f5516.zip |
Update the lumina-open crash handler to only trigger when an application process is detected as an actual crash - not just a non-zero return code.
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/core/lumina-open/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src-qt5/core/lumina-open/main.cpp b/src-qt5/core/lumina-open/main.cpp index d0bf79c0..2d86327c 100644 --- a/src-qt5/core/lumina-open/main.cpp +++ b/src-qt5/core/lumina-open/main.cpp @@ -380,7 +380,7 @@ int main(int argc, char **argv){ retcode = system(cmd.toLocal8Bit()); //need to run it through the "system" instead of QProcess }else if(cmd=="internalcrashtest"){ log = "This is a sample crash log"; - retcode = 2; + retcode = -1; }else{ QProcess *p = new QProcess(); p->setProcessEnvironment(QProcessEnvironment::systemEnvironment()); @@ -396,13 +396,13 @@ int main(int argc, char **argv){ if(p->state() != QProcess::Running){ break; } //somehow missed the finished signal } retcode = p->exitCode(); - if( (p->exitStatus()==QProcess::CrashExit) && retcode ==0){ retcode=1; } //so we catch it later + if( (p->exitStatus()==QProcess::CrashExit) && retcode ==0){ retcode=-1; } //so we catch it later log = QString(p->readAllStandardError()); if(log.isEmpty()){ log = QString(p->readAllStandardOutput()); } } //qDebug() << "[lumina-open] Finished Cmd:" << cmd << retcode << p->exitStatus(); if( QFile::exists("/tmp/.luminastopping") ){ watch = false; } //closing down session - ignore "crashes" (app could have been killed during cleanup) - if( (retcode > 0) && watch && !(retcode==1 && cmd.startsWith("pc-su ")) ){ //pc-su returns 1 if the user cancelles the operation + if( (retcode < 0) && watch){ //-1 is used internally for crashed processes - most apps return >=0 qDebug() << "[lumina-open] Application Error:" << retcode; //Setup the application |