Avoid problems with getpid on webhosts
This commit is contained in:
parent
6604623188
commit
5e48b82174
@ -70,11 +70,15 @@ class Logger
|
||||
|
||||
public static function is_fork()
|
||||
{
|
||||
try {
|
||||
if (self::$pid === null) {
|
||||
self::$pid = getmypid();
|
||||
}
|
||||
|
||||
return self::$pid !== getmypid();
|
||||
} catch (\danog\MadelineProto\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user