public static function spawnMaster()
    {
        Daemon::$masters->push($thread = new Thread\Master);
        $thread->start();

        if (-1 === $thread->getPid()) {
            Daemon::log('could not start master');
            exit(0);
        }

        return $thread->getPid();
    }