class
Process
Contents
Public types
- class Builder
- class PipeStream
Constructors, destructors, conversion operators
Public functions
- auto operator=(const Process& other) -> Process& deleted
- auto operator=(Process&& other) -> Process& noexcept
- void Wait()
- void Kill(bool force)
- auto GetExitCode() -> uint32
- auto IsRunning() const -> bool noexcept
- auto IsCrashed() const -> bool noexcept
- auto GetStandardInput() -> PipeStream&
- auto GetStandardOutput() -> PipeStream&
- auto GetStandardError() -> PipeStream&
Public variables
- fint _lastExitCode
- bool _crashed
- bool _running
- bool _redirectStdIn
- bool _redirectStdOut
- bool _redirectStdErr
- PipeStream _stdIn
- PipeStream _stdOut
- PipeStream _stdErr
- int _pid
Function documentation
bpf:: system:: Process:: ~Process()
Destructor, the process gets automatically killed if this is reached
void bpf:: system:: Process:: Wait()
Exceptions | |
---|---|
OSException | in case the system can't wait for the process |
Wait for the process to terminate
void bpf:: system:: Process:: Kill(bool force)
Parameters | |
---|---|
force | true to force kill, false otherwise |
Exceptions | |
OSException | in case the system could not send signal |
Kill the target process
uint32 bpf:: system:: Process:: GetExitCode()
Returns | exit code as an integer, undefined if process is still running |
---|---|
Exceptions | |
OSException | in case the system could not poll the target process |
Returns the exit code of the process
bool bpf:: system:: Process:: IsRunning() const noexcept
Returns | true if the process is running, false otherwise |
---|
Checks if this process is still running
bool bpf:: system:: Process:: IsCrashed() const noexcept
Returns | true if the process is crashed, false otherwise |
---|
Checks if this process is crashed
PipeStream& bpf:: system:: Process:: GetStandardInput()
Returns | reference to IOutputStream |
---|---|
Exceptions | |
OSException | if the target process does not allow standard input redirection |
Provides access to process standard input
PipeStream& bpf:: system:: Process:: GetStandardOutput()
Returns | reference to IInputStream |
---|---|
Exceptions | |
OSException | if the target process does not allow standard output redirection |
Provides access to process standard output
PipeStream& bpf:: system:: Process:: GetStandardError()
Returns | reference to IInputStream |
---|---|
Exceptions | |
OSException | if the target process does not allow standard error redirection |
Provides access to process standard error