mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 09:10:00 +00:00
Removed killing php to end the process
This commit is contained in:
parent
e0747a9c44
commit
dbc357c266
@ -35,5 +35,4 @@ require_once(FILE_PATH."/src/dependencies.php");
|
|||||||
$server = new ServerAPI();
|
$server = new ServerAPI();
|
||||||
$server->run();
|
$server->run();
|
||||||
|
|
||||||
|
exit(0);
|
||||||
kill(getmypid()); //Fix for segfault
|
|
@ -209,7 +209,8 @@ class ConsoleAPI{
|
|||||||
}
|
}
|
||||||
|
|
||||||
class ConsoleLoop extends Thread{
|
class ConsoleLoop extends Thread{
|
||||||
public $line, $stop;
|
public $line;
|
||||||
|
public $stop;
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
$this->line = false;
|
$this->line = false;
|
||||||
$this->stop = false;
|
$this->stop = false;
|
||||||
|
@ -315,7 +315,6 @@ class ServerAPI{
|
|||||||
$this->server->init();
|
$this->server->init();
|
||||||
unregister_tick_function(array($this->server, "tick"));
|
unregister_tick_function(array($this->server, "tick"));
|
||||||
$this->__destruct();
|
$this->__destruct();
|
||||||
unset($this->server);
|
|
||||||
if($this->getProperty("upnp-forwarding") === true ){
|
if($this->getProperty("upnp-forwarding") === true ){
|
||||||
console("[INFO] [UPnP] Removing port forward...");
|
console("[INFO] [UPnP] Removing port forward...");
|
||||||
UPnP_RemovePortForward($this->getProperty("port"));
|
UPnP_RemovePortForward($this->getProperty("port"));
|
||||||
|
@ -462,6 +462,9 @@ class PocketMinecraftServer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function dumpError(){
|
public function dumpError(){
|
||||||
|
if($this->stop === true){
|
||||||
|
return;
|
||||||
|
}
|
||||||
console("[ERROR] An Unrecovereable has ocurred and the server has Crashed. Creating an Error Dump");
|
console("[ERROR] An Unrecovereable has ocurred and the server has Crashed. Creating an Error Dump");
|
||||||
$dump = "# PocketMine-MP Error Dump ".date("D M j H:i:s T Y")."\r\n";
|
$dump = "# PocketMine-MP Error Dump ".date("D M j H:i:s T Y")."\r\n";
|
||||||
$er = error_get_last();
|
$er = error_get_last();
|
||||||
|
@ -25,25 +25,6 @@ the Free Software Foundation, either version 3 of the License, or
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function kill($pid){
|
|
||||||
switch(Utils::getOS()){
|
|
||||||
case "win":
|
|
||||||
ob_start();
|
|
||||||
passthru("%WINDIR%\\System32\\taskkill.exe /F /PID ".((int) $pid));
|
|
||||||
ob_end_clean();
|
|
||||||
break;
|
|
||||||
case "mac":
|
|
||||||
case "linux":
|
|
||||||
default:
|
|
||||||
ob_start();
|
|
||||||
passthru("kill -9 ".((int) $pid));
|
|
||||||
ob_end_clean();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function require_all($path, &$count = 0){
|
function require_all($path, &$count = 0){
|
||||||
$dir = dir($path."/");
|
$dir = dir($path."/");
|
||||||
$dirs = array();
|
$dirs = array();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user