/** * Starts the terminal process * Uses the class Process. * @return true if runs */ private function startProcess() { self::$process = new Process("su - {$this->login}"); // self::$process = new Process("vi"); if (!self::$process->isResource()) { throw new Exception("RESOURCE NOT AVAIBLE"); return false; } usleep(500000); self::$process->put($this->password); self::$process->put(chr(13)); self::$process->get(); usleep(500000); self::$status = self::$process->getStatus(); self::$meta = self::$process->metaData(); }