<?php


namespace Mainto\RpcServer\Util;


class OS {
    public static function setProcessTitle(string $title) {
        if (self::getOs() === "linux") {
            cli_set_process_title($title);
        }
    }

    public static function getOs() {
        return strtolower(PHP_OS);
    }

    public static function getShmDir() {
        if (self::getOs() === "linux") {
            return '/dev/shm';
        } else {
            return '/tmp';
        }
    }
}