From 4514923e15622f2db00c75eefc421b05202ab6b1 Mon Sep 17 00:00:00 2001 From: Francesc Guasch Date: Tue, 31 Oct 2023 08:51:01 +0100 Subject: [PATCH] fix: properly check if process has finished Also fixes problem locking machines when preparing --- lib/Ravada.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Ravada.pm b/lib/Ravada.pm index acaa1dc53..a3a00469c 100644 --- a/lib/Ravada.pm +++ b/lib/Ravada.pm @@ -4499,6 +4499,7 @@ sub _wait_pids($self) { for my $type ( keys %{$self->{pids}} ) { for my $pid ( keys %{$self->{pids}->{$type}}) { my $kid = waitpid($pid , WNOHANG); + next if kill(0,$pid); push @done, ($pid) if $kid == $pid || $kid == -1; } }