aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-20 19:56:07 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-20 19:56:07 +0100
commitf87c108ab88fe1235d326dbec879f60e11d6c9ec (patch)
treec81b3bd83f73039a1fbe83c92f754815c61419ab
parent31ac23b8c80c39946f608660a56f9c91ee188dc1 (diff)
downloadpaludis-f87c108ab88fe1235d326dbec879f60e11d6c9ec.tar.gz
paludis-f87c108ab88fe1235d326dbec879f60e11d6c9ec.tar.xz
Missing mutex locks
-rw-r--r--src/clients/cave/cmd_execute_resolution.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/clients/cave/cmd_execute_resolution.cc b/src/clients/cave/cmd_execute_resolution.cc
index 693b7a2..6f8cfbf 100644
--- a/src/clients/cave/cmd_execute_resolution.cc
+++ b/src/clients/cave/cmd_execute_resolution.cc
@@ -743,7 +743,7 @@ namespace
break;
}
- return 0;
+ return retcode;
}
int visit(UninstallJob & uninstall_item)
@@ -795,7 +795,7 @@ namespace
break;
}
- return 0;
+ return retcode;
}
int visit(FetchJob & fetch_item)
@@ -838,7 +838,7 @@ namespace
break;
}
- return 0;
+ return retcode;
}
};
@@ -1189,7 +1189,9 @@ namespace
if (want)
{
ExecuteOneVisitor execute(env, cmdline, counts, job_mutex, x1_pre, retcode);
- retcode |= job->accept_returning<int>(execute);
+ int local_retcode(job->accept_returning<int>(execute));
+ Lock lock(retcode_mutex);
+ retcode |= local_retcode;
}
}
@@ -1198,7 +1200,9 @@ namespace
if (want)
{
ExecuteOneVisitor execute(env, cmdline, counts, job_mutex, x1_main, retcode);
- retcode |= job->accept_returning<int>(execute);
+ int local_retcode(job->accept_returning<int>(execute));
+ Lock lock(retcode_mutex);
+ retcode |= local_retcode;
}
else if (! already_done)
{