summaryrefslogtreecommitdiffstats
path: root/lib/OpenSLX/ScopedResource.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/OpenSLX/ScopedResource.pm')
-rw-r--r--lib/OpenSLX/ScopedResource.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/OpenSLX/ScopedResource.pm b/lib/OpenSLX/ScopedResource.pm
index 3334ecde..af912691 100644
--- a/lib/OpenSLX/ScopedResource.pm
+++ b/lib/OpenSLX/ScopedResource.pm
@@ -152,14 +152,14 @@ sub _release
{
my $self = shift;
- # ignore ctrl-c while we are trying to release the resource, as otherwise
- # the resource would be leaked
- local $SIG{INT} = 'IGNORE';
-
# only release the resource if invoked by the owning process
vlog(3, "process $$ tries to release resource $self->{name}");
return if $self->{owner} != $$;
+ # ignore ctrl-c while we are trying to release the resource, as otherwise
+ # the resource would be leaked
+ local $SIG{INT} = 'IGNORE';
+
# release the resource and unset owner
if ($self->{release}->()) {
vlog(1, "process $$ released resource $self->{name}");