Skip to content

Commit 84ab480

Browse files
authored
Merge pull request php-pm#512 from jkrzefski/patch-1
Move register_shutdown_function from constructor to run method
2 parents 60bdd29 + 7bf8e46 commit 84ab480

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ProcessManager.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,6 @@ public function __construct(OutputInterface $output, $port = 8080, $host = '127.
247247

248248
$this->slaveCount = $slaveCount;
249249
$this->slaves = new SlavePool(); // create early, used during shutdown
250-
251-
register_shutdown_function([$this, 'shutdown']);
252250
}
253251

254252
/**
@@ -510,6 +508,7 @@ public function setReloadTimeout($reloadTimeout)
510508
public function run()
511509
{
512510
Debug::enable();
511+
register_shutdown_function([$this, 'shutdown']);
513512

514513
// make whatever is necessary to disable all stuff that could buffer output
515514
ini_set('zlib.output_compression', 0);

0 commit comments

Comments
 (0)