mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Fixed #304 Calculate Server Time Offset [gh#304]
This commit is contained in:
parent
ddec63c4d4
commit
2f05a03e51
3 changed files with 28 additions and 13 deletions
|
|
@ -73,16 +73,12 @@ function safe_var_dump($var, $cnt = 0){
|
|||
function kill($pid){
|
||||
switch(Utils::getOS()){
|
||||
case "win":
|
||||
ob_start();
|
||||
passthru("%WINDIR%\\System32\\taskkill.exe /F /PID ".((int) $pid)." > NUL");
|
||||
ob_end_clean();
|
||||
exec("taskkill.exe /F /PID ".((int) $pid)." > NUL");
|
||||
break;
|
||||
case "mac":
|
||||
case "linux":
|
||||
default:
|
||||
ob_start();
|
||||
passthru("kill -9 ".((int) $pid)." > /dev/null 2>&1");
|
||||
ob_end_clean();
|
||||
exec("kill -9 ".((int) $pid)." > /dev/null 2>&1");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue