From 1542826769328d267420f7eb0c9e4e039eee4432 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 17 Feb 2023 07:25:08 +0000 Subject: [PATCH] Bug 32558: (QA follow-up) Leave default to 1, remove extra fork Content-Type: text/plain; charset=utf-8 The default of 1 resembles the old behavior: 1 fork for the job. Signed-off-by: Marcel de Rooy --- misc/background_jobs_worker.pl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/misc/background_jobs_worker.pl b/misc/background_jobs_worker.pl index add96711c2..4eb191de47 100755 --- a/misc/background_jobs_worker.pl +++ b/misc/background_jobs_worker.pl @@ -157,23 +157,13 @@ while (1) { } } $conn->disconnect; +$pm->wait_all_children; sub process_job { my ( $job, $args ) = @_; - - my $pid; - if ( $pid = fork ) { - wait; - return; - } - - die "fork failed!" unless defined $pid; - try { $job->process( $args ); } catch { $job->status('failed')->store; }; - - exit; } -- 2.30.2