Zen API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kProcess.h
Go to the documentation of this file.
1 
11 #ifndef K_API_PROCESS_H
12 #define K_API_PROCESS_H
13 
14 #include <kApi/kApiDef.h>
15 #include <kApi/Utils/kProcess.x.h>
16 
28 //typedef kObject kProcess; --forward-declared in kApiDef.x.h
29 
30 
47 kFx(kStatus) kProcess_Construct(kProcess* process, const kChar* path, kAlloc allocator);
48 
57 kFx(kStatus) kProcess_AddArgument(kProcess process, const kChar* argument);
58 
68 kFx(kStatus) kProcess_AddArguments(kProcess process, const kChar* arguments[], kSize argCount);
69 
78 
90 kFx(kStatus) kProcess_Start(kProcess process);
91 
99 kFx(kBool) kProcess_IsAlive(kProcess process);
100 
112 kFx(kStatus) kProcess_Terminate(kProcess process);
113 
123 {
124  return kProcess_WaitImpl(process, timeout);
125 }
126 
139 kFx(k64s) kProcess_ExitCode(kProcess process);
140 
151 kFx(kStream) kProcess_StdIn(kProcess process);
152 
163 kFx(kStream) kProcess_StdOut(kProcess process);
164 
175 kFx(kStream) kProcess_StdErr(kProcess process);
176 
185 kFx(k32s) kProcess_Id();
186 
199 
207 
219 kFx(kStatus) kProcess_EnableShell(kProcess process, kBool enabled);
220 
221 #endif
k64s kProcess_ExitCode(kProcess process)
Gets the exit code of a process.
kStatus kProcess_Terminate(kProcess process)
Initiates process termination.
Represents a 64-bit unsigned integer.
kStatus kProcess_Construct(kProcess *process, const kChar *path, kAlloc allocator)
Constructs a kProcess object.
Represents an unsigned integer that can store a pointer address.
Abstract base class for memory allocator types.
kStatus kProcess_EnableStandardHandles(kProcess process, kBool enabled)
Enable read or write from/to the standard handles (stdin/stdout/stderr).
#define kInlineFx(TYPE)
Inline method declaration helper.
Definition: kApiDef.h:29
Represents a single unit (byte) in a UTF-8 character.
kStream kProcess_StdOut(kProcess process)
Returns the stdout of the process as kStream.
k32s kProcess_Id()
Returns the process id of the current process.
kStream kProcess_StdIn(kProcess process)
Returns the stdin of the process as kStream.
kBool kProcess_StandardHandlesEnabled(kProcess process)
Reports whether standard handles are currently enabled.
kBool kProcess_IsAlive(kProcess process)
Determines if the process is still alive.
Core Zen type declarations.
Represents an I/O stream.
Represents a 32-bit signed integer.
Represents a 64-bit signed integer.
kStatus kProcess_AddArguments(kProcess process, const kChar *arguments[], kSize argCount)
Adds an array of arguments.
Represents a process.
kStream kProcess_StdErr(kProcess process)
Returns the stderr of the process as kStream.
kStatus kProcess_EnableShell(kProcess process, kBool enabled)
Enable shell (.bat/.cmd) support.
kStatus kProcess_Start(kProcess process)
Starts the new process.
Represents an error code.
kStatus kProcess_Wait(kProcess process, k64u timeout)
Waits for child process completion.
Definition: kProcess.h:122
kStatus kProcess_AddArgument(kProcess process, const kChar *argument)
Adds an argument.
kStatus kProcess_ClearArguments(kProcess process)
Deletes all arguments.
Represents a boolean value.