mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-04 01:34:07 +02:00
Make the dependency on stdbuf optional for everything but notify
This commit is contained in:
parent
01b61508a7
commit
2a101e73bc
3 changed files with 31 additions and 1 deletions
|
|
@ -14,6 +14,8 @@ class System {
|
|||
|
||||
private $net;
|
||||
|
||||
private $stdbuf;
|
||||
|
||||
public static function getFD($num) {
|
||||
$folders = array(
|
||||
'/proc/self/fd',
|
||||
|
|
@ -40,4 +42,14 @@ class System {
|
|||
}
|
||||
return $this->net;
|
||||
}
|
||||
|
||||
public function hasStdBuf() {
|
||||
if (!$this->stdbuf) {
|
||||
$result = null;
|
||||
$output = array();
|
||||
exec('which stdbuf 2>&1', $output, $result);
|
||||
$this->stdbuf = $result === 0;
|
||||
}
|
||||
return $this->stdbuf;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue