From 6f5be5948bffa4ee65a69648fb9cd2b6a1acdb0c Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Wed, 2 Jan 2013 18:20:58 +0000 Subject: [PATCH] better version of the __DIE__ workaround --- Netdisco/bin/netdisco-daemon | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Netdisco/bin/netdisco-daemon b/Netdisco/bin/netdisco-daemon index 0f268feb..c6fcc9ca 100755 --- a/Netdisco/bin/netdisco-daemon +++ b/Netdisco/bin/netdisco-daemon @@ -60,7 +60,10 @@ sub worker_factory { return sub { my $self = shift; Role::Tiny->apply_roles_to_object($self, "App::Netdisco::Daemon::Worker::$role"); - $SIG{__DIE__} = sub { return @_ if $^S eq 1; $SIG{__DIE__}->(@_) }; + # XXX temporary hack to work around MCE's use of __DIE__ + my $mce_die = $SIG{__DIE__}; + $SIG{__DIE__} = sub { return @_ if $^S and $^S eq 1; $mce_die->(@_) }; + # XXX "there's nothing so permanent as temporary..." ~~ Milton Friedman $self->worker_begin if $self->can('worker_begin'); }; }