systemd: cleanup variable declarations

Move `$signal_info` down to where we declare the rest of the variables
shared with the callback.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2025-03-07 09:24:33 +01:00
parent 8e7d1b7ce5
commit 6c450ce52d

View File

@ -44,7 +44,6 @@ sub unescape_unit {
# main loop is being used as we need to wait signals.
sub systemd_call($;$) {
my ($code, $timeout) = @_;
my $signal_info;
my $bus = Net::DBus->system();
my $reactor = Net::DBus::Reactor->main();
@ -52,7 +51,7 @@ sub systemd_call($;$) {
my $service = $bus->get_service('org.freedesktop.systemd1');
my $if = $service->get_object('/org/freedesktop/systemd1', 'org.freedesktop.systemd1.Manager');
my ($finished, $current_result, $timer);
my ($finished, $current_result, $timer, $signal_info);
my $finish_callback = sub {
my ($result) = @_;