CommandReader: use PTHREADS_INHERIT_NONE

probably not necessary to register autoloader, but just in case...
This commit is contained in:
Dylan K. Taylor 2018-05-09 20:02:51 +01:00
parent be0e85dfae
commit c3822b795c
2 changed files with 5 additions and 1 deletions

View File

@ -1434,7 +1434,7 @@ class Server{
$this->tickSleeper->addNotifier($consoleNotifier, function() : void{ $this->tickSleeper->addNotifier($consoleNotifier, function() : void{
$this->checkConsole(); $this->checkConsole();
}); });
$this->console->start(); $this->console->start(PTHREADS_INHERIT_NONE);
$version = new VersionString($this->getPocketMineVersion()); $version = new VersionString($this->getPocketMineVersion());

View File

@ -49,6 +49,8 @@ class CommandReader extends Thread{
if(extension_loaded("readline") and !isset($opts["disable-readline"]) and !$this->isPipe(STDIN)){ if(extension_loaded("readline") and !isset($opts["disable-readline"]) and !$this->isPipe(STDIN)){
$this->type = self::TYPE_READLINE; $this->type = self::TYPE_READLINE;
} }
$this->setClassLoader();
} }
public function shutdown(){ public function shutdown(){
@ -168,6 +170,8 @@ class CommandReader extends Thread{
} }
public function run(){ public function run(){
$this->registerClassLoader();
if($this->type !== self::TYPE_READLINE){ if($this->type !== self::TYPE_READLINE){
$this->initStdin(); $this->initStdin();
} }