From 0b6bce6d2fad447950dfa2e9dcff2033de9071b4 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 17 Apr 2013 14:23:05 -0700 Subject: [PATCH] Do not bother with ForkController for procs=1. Change-Id: I84d4dd5369c5640b849d2fb58e01b8565b2abd65 --- maintenance/runJobs.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/maintenance/runJobs.php b/maintenance/runJobs.php index 66d8028f06..ef80df5bc7 100644 --- a/maintenance/runJobs.php +++ b/maintenance/runJobs.php @@ -61,10 +61,11 @@ class RunJobs extends Maintenance { $procs = intval( $this->getOption( 'procs' ) ); if ( $procs < 1 || $procs > 1000 ) { $this->error( "Invalid argument to --procs", true ); - } - $fc = new ForkController( $procs ); - if ( $fc->start() != 'child' ) { - exit( 0 ); + } elseif ( $procs != 1 ) { + $fc = new ForkController( $procs ); + if ( $fc->start() != 'child' ) { + exit( 0 ); + } } } $maxJobs = $this->getOption( 'maxjobs', false ); -- 2.20.1