Fixed issue with detached execution not returning the correct result status

FossilOrigin-Name: 28d8e8098a1f1d19ce8494c1926dad0490632b82
This commit is contained in:
Kostas
2015-08-14 10:42:39 +00:00
parent 48ed97dc10
commit 5b400ead74
3 changed files with 13 additions and 8 deletions

View File

@@ -727,7 +727,12 @@ bool Fossil::runFossilRaw(const QStringList &args, QStringList *output, int *exi
// Detached processes use the command-line only, to avoid having to wait
// for the temporary args file to be released before returing
if(detached)
return QProcess::startDetached(fossil, args, wkdir);
{
bool started = QProcess::startDetached(fossil, args, wkdir);
if(exitCode)
*exitCode = started ? EXIT_SUCCESS : EXIT_FAILURE;
return started;
}
// Make status message
QString status_msg = QObject::tr("Running Fossil");