$sudo
$sudo : bool
Tool for executing commands
$sudo : bool
$stack : \App\CoreModule\Entities\CommandStack
run(string $command, bool $needSudo = false, string|int|float|bool|resource|\Traversable|null $input = null) : \App\CoreModule\Entities\ICommand
Executes shell command and returns output
string | $command | Command to execute |
bool | $needSudo | Does the command need sudo? |
string|int|float|bool|resource|\Traversable|null | $input | Command's input |
When process can't be launched
When process timed out
When process stopped after receiving signal
Command entity
runAsync(callable $callback, string $command, bool $needSudo = false, int $timeout = 36000, string|int|float|bool|resource|\Traversable|null $input = null) : void
Executes the command asynchronously
callable | $callback | Callback to run whenever there is some output available on STDOUT or STDERR |
string | $command | Command to execute |
bool | $needSudo | Does the command need sudo? |
int | $timeout | Command's timeout |
string|int|float|bool|resource|\Traversable|null | $input | Command's input |