From 3bf4addb2497704877a8caa0d3456afc9b1aa0c8 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 --- misc/workers/background_jobs_worker.pl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/misc/workers/background_jobs_worker.pl b/misc/workers/background_jobs_worker.pl index c5b84adcb1..c54610458f 100755 --- a/misc/workers/background_jobs_worker.pl +++ b/misc/workers/background_jobs_worker.pl @@ -160,23 +160,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