From: Aaron Schulz Date: Wed, 17 Apr 2013 21:23:05 +0000 (-0700) Subject: Do not bother with ForkController for procs=1. X-Git-Tag: 1.31.0-rc.0~19965^2 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=0b6bce6d2fad447950dfa2e9dcff2033de9071b4;p=lhc%2Fweb%2Fwiklou.git Do not bother with ForkController for procs=1. Change-Id: I84d4dd5369c5640b849d2fb58e01b8565b2abd65 --- 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 );