Index: trunk/phase3/maintenance/storage/recompressTracked.php |
— | — | @@ -169,7 +169,9 @@ |
170 | 170 | function startSlaveProcs() { |
171 | 171 | $cmd = 'php ' . wfEscapeShellArg( __FILE__ ); |
172 | 172 | foreach ( self::$cmdLineOptionMap as $cmdOption => $classOption ) { |
173 | | - if ( in_array( $cmdOption, self::$optionsWithArgs ) ) { |
| 173 | + if ( $cmdOption == 'slave-id' ) { |
| 174 | + continue; |
| 175 | + } elseif ( in_array( $cmdOption, self::$optionsWithArgs ) && isset( $this->$classOption ) ) { |
174 | 176 | $cmd .= " --$cmdOption " . wfEscapeShellArg( $this->$classOption ); |
175 | 177 | } elseif ( $this->$classOption ) { |
176 | 178 | $cmd .= " --$cmdOption"; |
— | — | @@ -184,14 +186,14 @@ |
185 | 187 | $pipes = false; |
186 | 188 | $spec = array( |
187 | 189 | array( 'pipe', 'r' ), |
188 | | - array( 'file', '/dev/stdout', 'w' ), |
189 | | - array( 'file', '/dev/stderr', 'w' ) |
| 190 | + array( 'file', 'php://stdout', 'w' ), |
| 191 | + array( 'file', 'php://stderr', 'w' ) |
190 | 192 | ); |
191 | 193 | wfSuppressWarnings(); |
192 | 194 | $proc = proc_open( "$cmd --slave-id $i", $spec, $pipes ); |
193 | 195 | wfRestoreWarnings(); |
194 | 196 | if ( !$proc ) { |
195 | | - $this->critical( "Error opening slave process" ); |
| 197 | + $this->critical( "Error opening slave process: $cmd" ); |
196 | 198 | exit( 1 ); |
197 | 199 | } |
198 | 200 | $this->slaveProcs[$i] = $proc; |
— | — | @@ -396,6 +398,7 @@ |
397 | 399 | case 'quit': |
398 | 400 | return; |
399 | 401 | } |
| 402 | + wfWaitForSlaves( 5 ); |
400 | 403 | } |
401 | 404 | } |
402 | 405 | |