aboutsummaryrefslogtreecommitdiff
path: root/lib/App/Glacier/DB/GDBM.pm
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-12-19 14:35:49 +0200
committerSergey Poznyakoff <gray@gnu.org>2018-12-19 14:55:09 +0200
commitea2c058ce96484937fcfe52dc7382a461a9d72e3 (patch)
treeae86e1115c3ef91bc03d2cfcb7df4f7ff8d19ce9 /lib/App/Glacier/DB/GDBM.pm
parent249512af92d3f592ae683279c2cd1f54a7c1a726 (diff)
downloadglacier-ea2c058ce96484937fcfe52dc7382a461a9d72e3.tar.gz
glacier-ea2c058ce96484937fcfe52dc7382a461a9d72e3.tar.bz2
Bugfixes.
* lib/App/Glacier/Command.pm (option,check_job): New methods. * lib/App/Glacier/Command/Get.pm: Rewrite debug messages (fixes temporary solution in 6c6dab5d). * lib/App/Glacier/Command/Jobs.pm: Rewrite the db->foreach sub. * lib/App/Glacier/Command/Periodic.pm: Likewise. * lib/App/Glacier/DB/GDBM.pm (CLONE_SKIP): New method. * lib/App/Glacier/Job.pm: Overload the "" operator. * lib/App/Glacier/Roster.pm (foreach): Overload method.
Diffstat (limited to 'lib/App/Glacier/DB/GDBM.pm')
-rw-r--r--lib/App/Glacier/DB/GDBM.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/App/Glacier/DB/GDBM.pm b/lib/App/Glacier/DB/GDBM.pm
index 0e14a65..f7cc29a 100644
--- a/lib/App/Glacier/DB/GDBM.pm
+++ b/lib/App/Glacier/DB/GDBM.pm
@@ -8,2 +8,6 @@ use File::Path qw(make_path);
+# Avoid coredumps in threaded code.
+# See https://rt.perl.org/Public/Bug/Display.html?id=61912.
+sub CLONE_SKIP { 1 }
+
sub new {
@@ -54,7 +58,4 @@ sub configtest {
-# We can't tie the DB to $self->{_map} at once, in the new method, because
-# this will cause coredumps in threaded code (see
-# https://rt.perl.org/Public/Bug/Display.html?id=61912). So, the following
-# auxiliary method is used, which calls &$code with $self->{_map} tied
-# to the DB.
+# Tie in the database, run $code, and untie it again. Correctly handle
+# nested invocations to avoid deadlocking.
sub _tied {

Return to:

Send suggestions and report system problems to the System administrator.