From 24aec22e62a69c463acfbff820c3fa7a920d9585 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Thu, 18 Feb 2010 14:20:04 -0800 Subject: Call fork_callback conditionally Only call fork_callback in Wallet::Kadmin::MIT if it's set, allowing the module to work without setting it. --- perl/Wallet/Kadmin/MIT.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perl/Wallet/Kadmin/MIT.pm b/perl/Wallet/Kadmin/MIT.pm index f181739..a7ccf99 100644 --- a/perl/Wallet/Kadmin/MIT.pm +++ b/perl/Wallet/Kadmin/MIT.pm @@ -83,7 +83,7 @@ sub kadmin { $self->error ("cannot fork: $!"); return; } elsif ($pid == 0) { - $self->{fork_callback} (); + $self->{fork_callback} () if $self->{fork_callback}; unless (open (STDERR, '>&STDOUT')) { warn "wallet: cannot dup stdout: $!\n"; exit 1; -- cgit v1.2.3