Nebula
Loading...
Searching...
No Matches
posixprocess.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
10#include "util/string.h"
11#include "io/uri.h"
12#include "io/stream.h"
14
15//------------------------------------------------------------------------------
16namespace Posix
17{
19{
20public:
21
24
26 bool LaunchWait() const;
28 bool Launch();
30 bool IsRunning();
32 void UpdateStdoutStream();
34 bool CheckIfExists();
36 static bool CheckIfExists(const IO::URI & program);
37
38private:
40 void CleanUp() const;
41
42 int inPipe;
45 pid_t pid;
46};
47
48} // namespace Posix
49//------------------------------------------------------------------------------
Base class for launching an external application.
Definition processbase.h:19
An URI object can split a Uniform Resource Identifier string into its components or build a string fr...
Definition uri.h:67
Definition posixprocess.h:19
int inPipe
Definition posixprocess.h:42
bool LaunchWait() const
launch application and wait for its termination
Definition posixprocess.cc:30
bool Launch()
launch application (returns immediately)
Definition posixprocess.cc:56
int outPipe
Definition posixprocess.h:43
bool IsRunning()
Gets the state of application. Call this per frame.
Definition posixprocess.cc:175
void CleanUp() const
cleanup all pipes
Definition posixprocess.cc:252
int errPipe
Definition posixprocess.h:44
pid_t pid
Definition posixprocess.h:45
void UpdateStdoutStream()
Read data from the captured stdout and writes it to the stream.
Definition posixprocess.cc:205
bool CheckIfExists()
Detect if an instance of the process is already running.
Definition posixprocess.cc:232
PosixProcess()
constructor
Definition posixprocess.cc:17
Posix implemention of a read-many write-few lock.
Definition posixsysfunc.cc:21