Create process, poll and send output to console buffer
This commit is contained in:
@@ -208,14 +208,14 @@ For(arr.reverse_iter()) {
|
||||
}
|
||||
*/
|
||||
#define IterRemove(a) for (int i = 0; i < (a).len; i += 1)
|
||||
#define IterRemovePrepare(a) \
|
||||
auto &it = (a)[i]; \
|
||||
bool remove_item = false; \
|
||||
defer { \
|
||||
if (remove_item) { \
|
||||
(a).ordered_remove(it); \
|
||||
i -= 1; \
|
||||
} \
|
||||
#define IterRemovePrepare(a) \
|
||||
auto &it = (a)[i]; \
|
||||
bool remove_item = false; \
|
||||
defer { \
|
||||
if (remove_item) { \
|
||||
Remove(&(a), it); \
|
||||
i -= 1; \
|
||||
} \
|
||||
}
|
||||
#define ForItem(it, array) for (auto &it : (array))
|
||||
#define For(array) ForItem(it, array)
|
||||
|
||||
@@ -46,7 +46,7 @@ struct Process {
|
||||
char platform[6 * 8];
|
||||
};
|
||||
|
||||
Process RunCmd(String command_line, String working_dir);
|
||||
Process CreateCommandLineProcess(String command_line, String working_dir);
|
||||
bool WaitForExit(Process *process);
|
||||
bool PollExitCode(Process *process);
|
||||
void KillProcess(Process *process);
|
||||
|
||||
@@ -318,7 +318,7 @@ static void Win32ProcessError(Process *process, String cmd) {
|
||||
Win32CloseProcess(process);
|
||||
}
|
||||
|
||||
Process RunCmd(String command_line, String working_dir) {
|
||||
Process CreateCommandLineProcess(String command_line, String working_dir) {
|
||||
Process process = {};
|
||||
Win32Process *p = (Win32Process *)process.platform;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user