Nebula
Toggle main menu visibility
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
"
13
#include "
system/base/processbase.h
"
14
15
//------------------------------------------------------------------------------
16
namespace
Posix
17
{
18
class
PosixProcess
:
public
Base::Process
19
{
20
public
:
21
23
PosixProcess
();
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
38
private
:
40
void
CleanUp
()
const
;
41
42
int
inPipe
;
43
int
outPipe
;
44
int
errPipe
;
45
pid_t
pid
;
46
};
47
48
}
// namespace Posix
49
//------------------------------------------------------------------------------
Base::Process
Base class for launching an external application.
Definition
processbase.h:19
IO::URI
An URI object can split a Uniform Resource Identifier string into its components or build a string fr...
Definition
uri.h:67
Posix::PosixProcess::inPipe
int inPipe
Definition
posixprocess.h:42
Posix::PosixProcess::LaunchWait
bool LaunchWait() const
launch application and wait for its termination
Definition
posixprocess.cc:30
Posix::PosixProcess::Launch
bool Launch()
launch application (returns immediately)
Definition
posixprocess.cc:56
Posix::PosixProcess::outPipe
int outPipe
Definition
posixprocess.h:43
Posix::PosixProcess::IsRunning
bool IsRunning()
Gets the state of application. Call this per frame.
Definition
posixprocess.cc:175
Posix::PosixProcess::CleanUp
void CleanUp() const
cleanup all pipes
Definition
posixprocess.cc:252
Posix::PosixProcess::errPipe
int errPipe
Definition
posixprocess.h:44
Posix::PosixProcess::pid
pid_t pid
Definition
posixprocess.h:45
Posix::PosixProcess::UpdateStdoutStream
void UpdateStdoutStream()
Read data from the captured stdout and writes it to the stream.
Definition
posixprocess.cc:205
Posix::PosixProcess::CheckIfExists
bool CheckIfExists()
Detect if an instance of the process is already running.
Definition
posixprocess.cc:232
Posix::PosixProcess::PosixProcess
PosixProcess()
constructor
Definition
posixprocess.cc:17
Posix
Posix implemention of a read-many write-few lock.
Definition
posixsysfunc.cc:21
processbase.h
stream.h
string.h
uri.h
code
foundation
system
posix
posixprocess.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.