[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/cmake/automoc [POSSIBLY UNSAFE]
From: Dirk Mueller <mueller () kde ! org>
Date: 2007-08-21 14:14:51
Message-ID: 1187705691.489932.14552.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 702914 by mueller:
add some debug output to be able to track the
magic qprocess-timed-out bug better.
M +16 -13 kde4automoc.cpp [POSSIBLY UNSAFE: system]
--- trunk/KDE/kdelibs/cmake/automoc/kde4automoc.cpp #702913:702914
@@ -242,6 +242,7 @@
if (failed) {
// if any moc process failed we don't want to touch the _automoc.cpp file so that
// kde4automoc is rerun until the issue is fixed
+ cerr << "returning failed.."<< endl;
return false;
}
outStream.flush();
@@ -258,21 +259,17 @@
{
while (!processes.isEmpty()) {
Process proc = processes.dequeue();
-
+
bool result = proc.qproc->waitForFinished();
//ignore errors from the cmake echo process
if (!proc.mocFilePath.isEmpty()) {
- if (!result) {
- cerr << "kde4automoc: process failed: " << proc.qproc->errorString() << endl;
+ if (!result || proc.qproc->exitCode()) {
+ cerr << "kde4automoc: process for " << proc.mocFilePath
+ << " failed: " << proc.qproc->errorString() << endl;
+ cerr << "pid to wait for: " << proc.qproc->pid() << endl;
+ system("/bin/ps ux");
failed = true;
- if (!proc.mocFilePath.isEmpty()) {
- QFile::remove(proc.mocFilePath);
- }
- } else if (proc.qproc->exitCode() != 0) {
- failed = true;
- if (!proc.mocFilePath.isEmpty()) {
- QFile::remove(proc.mocFilePath);
- }
+ QFile::remove(proc.mocFilePath);
}
}
delete proc.qproc;
@@ -301,7 +298,13 @@
args << "-o" << mocFilePath << sourceFile;
//qDebug() << "executing: " << mocExe << args;
mocProc->start(mocExe, args, QIODevice::NotOpen);
- mocProc->waitForStarted();
- processes.enqueue(Process(mocProc, mocFilePath));
+ if (mocProc->waitForStarted())
+ processes.enqueue(Process(mocProc, mocFilePath));
+ else {
+ cerr << "kde4automoc: process for " << mocFilePath << "failed to start: "
+ << mocProc->errorString() << endl;
+ failed = true;
+ delete mocProc;
+ }
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic