protected $lang;
protected $ssh = null;
protected $longArgSeparator = '=';
+ protected $timeout = 0;
function __construct($program, $output = null, $error = true)
{
}
}
+ if ($this->getTimeout() > 0) {
+ $commande = 'timeout ' . $this->getTimeout() . ' ' . $commande;
+ }
+
if ($this->nohup) {
$commande = 'nohup ' . $commande;
}
return $this->commande;
}
+ /**
+ * @return int
+ */
+ public function getTimeout(): int
+ {
+ return $this->timeout;
+ }
+
+ /**
+ * @param int $timeout
+ */
+ public function setTimeout(int $timeout): void
+ {
+ $this->timeout = $timeout;
+ }
+
}