aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-10-27 14:29:28 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-10-27 14:30:07 +0000
commit4edbd1da2873204b78920722f08bfe6b73641cfb (patch)
tree1a1617ef5ea1453b44975aed0f440cad198d884e
parentc57eefce26a73692c2cae2ae5b4db392f280bf4d (diff)
downloadpaludis-4edbd1da2873204b78920722f08bfe6b73641cfb.tar.gz
paludis-4edbd1da2873204b78920722f08bfe6b73641cfb.tar.xz
need to signal on failure
-rw-r--r--src/clients/cave/cmd_sync.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/clients/cave/cmd_sync.cc b/src/clients/cave/cmd_sync.cc
index 6a1e333..47b991b 100644
--- a/src/clients/cave/cmd_sync.cc
+++ b/src/clients/cave/cmd_sync.cc
@@ -166,13 +166,20 @@ namespace
std::tr1::ref(np), std::tr1::ref(na), std::tr1::ref(nd),
std::tr1::ref(finished), std::tr1::ref(*output_deviant)));
- result = repo->syncable_interface()->sync(output_deviant);
+ try
+ {
+ result = repo->syncable_interface()->sync(output_deviant);
+ {
+ Lock lock(mutex);
+ finished = true;
+ }
+ }
+ catch (...)
{
- Lock lock(mutex);
- finished = true;
+ notifier_condition.acquire_then_signal(notifier_mutex);
+ throw;
}
-
notifier_condition.acquire_then_signal(notifier_mutex);
}