Util Process A general process utility
MIT License
Methods | ||
---|---|---|
public
|
__construct()
|
# |
public
|
setDescriptor(int $fd, string $type, string|array $mode, string $alias = '', array $opts = []): $this|bool
|
# |
public
|
getOption($name)
|
# |
public
|
getPipeNames(): array
|
# |
public
|
setDescriptorOption($fd, $opt, $value)
|
# |
public
static
|
exec(array|string $cmd, mixed $args = null, array $exits = [0], array $opts = []): array
|
# |
public
static
|
decompose($cmd): array
|
# |
public
static
|
mkfifo(string $path = '/tmp'): string|null
|
# |
public
|
__destruct()
|
# |
public
|
run($cmd, ...$args)
|
# |
public
|
setPriority(int $prio): $this|bool|void
|
# |
public
|
setSuid($user): void
|
# |
public
|
setSgid($group): void
|
# |
public
|
process(): unknown_type
|
# |
public
|
getDescriptors()
|
# |
public
|
getDescriptorMode(int|string $fd): string
|
# |
public
|
getDescriptorType(int|string $fd): string
|
# |
public
|
getDescriptorOptions($fd)
|
# |
public
|
pipeClose(int|resource &$pipe): bool
|
# |
public
&
|
getPipePeer()
|
# |
public
|
getProcessStatus(): array|null
|
# |
public
|
pipe($cmd, ...$args)
|
# |
public
|
pipeProcess(Util_Process &$peer): object
|
# |
public
|
setEncoding($mode, $fd = null)
|
# |
public
|
pipeDescriptor($read, $write)
|
# |
public
|
forceRun(): bool|Util_Process
|
# |
public
|
running()
|
# |
public
|
format(string $fmt = 'apnscp'): mixed
|
# |
public
|
getExit(): int
|
# |
public
|
exitSuccess()
|
# |
public
|
getOutput($pipe)
|
# |
public
|
addEnvironment($name, $val): $this
|
# |
public
|
setResource(array $limits): void
|
# |
public
|
setEnvironment(mixed $name, mixed $val = null): $this
|
# |
public
|
unsetEnvironment($var)
|
# |
public
|
getEnvironment()
|
# |
public
|
close(): int
|
# |
public
|
pipeRead(int|resource $pipe, int $length = -1, int $offset = 0): string
|
# |
public
|
pipeWrite(int|resource $pipe, string $data, int $length = null): int
|
# |
public
|
getExits()
|
# |
public
|
setExits($exits = '/./')
|
# |
public
|
getCommand(bool $raw = false): string
|
# |
public
|
setOption(string $name, mixed $val = null): $this
|
# |
public
|
setUnshare(Unshare $pool)
|
# |
public
|
setTee($file)
|
# |
public
|
addCallback(callable $function, string $when = 'read', array ...$args): void
|
# |
public
|
getDescriptorOption($fd, $opt)
|
# |
public
|
deleteCallback(string $when, string $namespace = ''): bool|void
|
# |
Constants | ||
---|---|---|
public
|
DEFAULT_PATH = '/usr/local/sbin:/usr/local/bin:/sbin:/bin'
|
# |