diff options
author | Ken Moore <ken@pcbsd.org> | 2014-12-30 08:45:07 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2014-12-30 08:45:07 -0500 |
commit | 18d797031bdff03967d38d1f8b2ca847b3362af5 (patch) | |
tree | b265f8adc6291f868292ca80975f0794a0734c96 /lumina-open | |
parent | Add a quick check to the FreeBSD screen brightness functions for not allowing... (diff) | |
download | lumina-18d797031bdff03967d38d1f8b2ca847b3362af5.tar.gz lumina-18d797031bdff03967d38d1f8b2ca847b3362af5.tar.bz2 lumina-18d797031bdff03967d38d1f8b2ca847b3362af5.zip |
Commit some more XLib->XCB conversions (everything for the task manager), and fix a stray seg fault in the XCB window class detection routine.
Diffstat (limited to 'lumina-open')
-rw-r--r-- | lumina-open/main.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lumina-open/main.cpp b/lumina-open/main.cpp index a92a585f..e560f0df 100644 --- a/lumina-open/main.cpp +++ b/lumina-open/main.cpp @@ -292,29 +292,33 @@ int main(int argc, char **argv){ //Now run the command (move to execvp() later?) if(cmd.isEmpty()){ return 0; } //no command to run (handled internally) if(!args.isEmpty()){ cmd.append(" \""+args+"\""); } - int retcode = system( cmd.toUtf8() ); - /* + //int retcode = system( cmd.toUtf8() ); + qDebug() << "[lumina-open] Running Cmd:" << cmd; QProcess *p = new QProcess(); p->setProcessEnvironment(QProcessEnvironment::systemEnvironment()); if(!path.isEmpty() && QFile::exists(path)){ p->setWorkingDirectory(path); } - p->start(cmd+" \""+args+"\""); + p->start(cmd); //Check the startup procedure - while(!p->waitForStarted(5000)){ + /*while(!p->waitForStarted(5000)){ if(p->state() == QProcess::NotRunning){ //bad/invalid start - qDebug() << "[lumina-open] Application did not startup properly:"<<cmd+" "+args; + qDebug() << "[lumina-open] Application did not start properly:"<<cmd; return p->exitCode(); }else if(p->state() == QProcess::Running){ //This just missed the "started" signal - continue break; } - } + }*/ //Now check up on it once every minute until it is finished while(!p->waitForFinished(60000)){ + qDebug() << "[lumina-open] process check:" << p->state(); if(p->state() != QProcess::Running){ break; } //somehow missed the finished signal } - int retcode = p->exitCode();*/ - if(retcode!=0){ + int retcode = p->exitCode(); + qDebug() << "[lumina-open] Finished Cmd:" << cmd << retcode << p->exitStatus(); + + //if(retcode!=0 ){ + if(p->exitStatus() == QProcess::CrashExit){ qDebug() << "[lumina-open] Application Error:" << retcode; //Setup the application QApplication App(argc, argv); |