Skip to content

Latest commit

 

History

History
238 lines (172 loc) · 5.02 KB

Process.md

File metadata and controls

238 lines (172 loc) · 5.02 KB

Process

  • class Process (php\lang\Process)
  • package std
  • source php/lang/Process.php

Description

Class Process


Methods


Methods

__construct()

__construct(array $commands, null|string|File $directory, array $environment): void

start()

start(): Process

startAndWait()

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()

getExitValue(): int|null

Returns the exit value for the subprocess.


destroy()

destroy(bool $force): void

Kills the subprocess. The subprocess represented by this Process object is forcibly terminated.


getInput()

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()

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()

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()

inheritIO(): php\lang\Process

redirectOutputToFile()

redirectOutputToFile(mixed $file): php\lang\Process

redirectOutputToInherit()

redirectOutputToInherit(): php\lang\Process

redirectOutputToPipe()

redirectOutputToPipe(): php\lang\Process

redirectErrorToFile()

redirectErrorToFile(mixed $file): php\lang\Process

redirectErrorToInherit()

redirectErrorToInherit(): php\lang\Process

redirectErrorToPipe()

redirectErrorToPipe(): php\lang\Process

redirectInputFromFile()

redirectInputFromFile(mixed $file): php\lang\Process

redirectInputFromInherit()

redirectInputFromInherit(): php\lang\Process

redirectInputFromPipe()

redirectInputFromPipe(): php\lang\Process

isAlive()

isAlive(): bool

Tests whether the subprocess represented by this {@code Process} is alive.


waitFor()

waitFor(): int

Causes the current thread to wait, if necessary, until the process represented by this {@code Process} object has terminated.