From 7a1f1f496196e1b60f4f353ba5b5d404060953c4 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 The default of 1 resembles the old behavior: 1 fork for the job. Signed-off-by: Marcel de Rooy Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 3bf4addb2497704877a8caa0d3456afc9b1aa0c8) Signed-off-by: Jacob O'Mara (cherry picked from commit 13023b2fe867d621170b694ed61168072fc50202) Signed-off-by: Lucas Gass --- 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.39.5