public function run() {
$set = array(
'command' => 'work',
);
$this->demon = $this->setParam($set);
chdir($this->demon['dir']);
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
/* Система Windows */
pclose(popen('start /B cmd /C "php '. $this->demon['name'] .' >NUL 2>NUL"', 'r'));
} else {
/* Система *nix */
$command = 'php -f ' . $this->demon['name'] . ' > /dev/null 2>&1 &';
exec($command);
}
}