mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
Add some debugging code to QProcess. Reconfigure (python) starts and finishes here (ubuntu9.04) but doesn't proceed and returns this:
/home/younes/devel/lyx/trunk/src/support/Systemcall.cpp(66): Qprocess python -tt '/home/younes/devel/lyx/trunk/lib/configure.py' --with-version-suffix=2.0 finished! /home/younes/devel/lyx/trunk/src/support/Systemcall.cpp(67): exitCode 2 /home/younes/devel/lyx/trunk/src/support/Systemcall.cpp(68): error 5 /home/younes/devel/lyx/trunk/src/support/Systemcall.cpp(69): state 0 /home/younes/devel/lyx/trunk/src/support/Systemcall.cpp(70): status 0 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29625 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fae3c1669f
commit
dc267d6dd9
@ -13,6 +13,8 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "support/debug.h"
|
||||
#include "support/qstring_helpers.h"
|
||||
#include "support/Systemcall.h"
|
||||
#include "support/os.h"
|
||||
|
||||
@ -46,7 +48,27 @@ int Systemcall::startscript(Starttype how, string const & what)
|
||||
QString cmd = QString::fromLocal8Bit(command.c_str());
|
||||
QProcess process;
|
||||
process.start(cmd);
|
||||
process.waitForFinished();
|
||||
if (!process.waitForStarted(1000)) {
|
||||
LYXERR0("Qprocess " << cmd << " did not start!");
|
||||
LYXERR0("error " << process.error());
|
||||
LYXERR0("state " << process.state());
|
||||
LYXERR0("status " << process.exitStatus());
|
||||
return 10;
|
||||
}
|
||||
if (!process.waitForFinished(30000)) {
|
||||
LYXERR0("Qprocess " << cmd << " did not finished!");
|
||||
LYXERR0("error " << process.error());
|
||||
LYXERR0("state " << process.state());
|
||||
LYXERR0("status " << process.exitStatus());
|
||||
return 20;
|
||||
}
|
||||
if (process.exitCode()) {
|
||||
LYXERR0("Qprocess " << cmd << " finished!");
|
||||
LYXERR0("exitCode " << process.exitCode());
|
||||
LYXERR0("error " << process.error());
|
||||
LYXERR0("state " << process.state());
|
||||
LYXERR0("status " << process.exitStatus());
|
||||
}
|
||||
return process.exitCode();
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user