- class
Process
(php\lang\Process
) - package
std
- source
php/lang/Process.php
Description
Class Process
->
__construct()
->
start()
->
startAndWait()
- Causes the current thread to wait, if necessary, until the->
getExitValue()
- Returns the exit value for the subprocess.->
destroy()
- Kills the subprocess. The subprocess represented by this->
getInput()
- Returns the input stream connected to the normal output of the->
getOutput()
- Returns the output stream connected to the normal input of the->
getError()
- Returns the input stream connected to the error output of the->
inheritIO()
->
redirectOutputToFile()
->
redirectOutputToInherit()
->
redirectOutputToPipe()
->
redirectErrorToFile()
->
redirectErrorToInherit()
->
redirectErrorToPipe()
->
redirectInputFromFile()
->
redirectInputFromInherit()
->
redirectInputFromPipe()
->
isAlive()
- Tests whether the subprocess represented by this {@code Process} is->
waitFor()
- Causes the current thread to wait, if necessary, until the
__construct(array $commands, null|string|File $directory, array $environment): void
start(): Process
startAndWait(): php\lang\Process
Causes the current thread to wait, if necessary, until the
process represented by this Process
object has
terminated. This method returns immediately if the subprocess
has already terminated. If the subprocess has not yet
terminated, the calling thread will be blocked until the
subprocess exits.
getExitValue(): int|null
Returns the exit value for the subprocess.
destroy(bool $force): void
Kills the subprocess. The subprocess represented by this
Process
object is forcibly terminated.
getInput(): Stream
Returns the input stream connected to the normal output of the
subprocess. The stream obtains data piped from the standard
output of the process represented by this Process
object.
getOutput(): Stream
Returns the output stream connected to the normal input of the
subprocess. Output to the stream is piped into the standard
input of the process represented by this Process
object.
getError(): Stream
Returns the input stream connected to the error output of the
subprocess. The stream obtains data piped from the error output
of the process represented by this Process
object.
inheritIO(): php\lang\Process
redirectOutputToFile(mixed $file): php\lang\Process
redirectOutputToInherit(): php\lang\Process
redirectOutputToPipe(): php\lang\Process
redirectErrorToFile(mixed $file): php\lang\Process
redirectErrorToInherit(): php\lang\Process
redirectErrorToPipe(): php\lang\Process
redirectInputFromFile(mixed $file): php\lang\Process
redirectInputFromInherit(): php\lang\Process
redirectInputFromPipe(): php\lang\Process
isAlive(): bool
Tests whether the subprocess represented by this {@code Process} is alive.
waitFor(): int
Causes the current thread to wait, if necessary, until the process represented by this {@code Process} object has terminated.