Set struct default initialization values

Modified uniproc_create_process signature to take a command and a list of arguments
Updated uniproc_win64.c to terminate the process before closing the handles
Updated uniproc_win64.c to convert the command and list of arguments into a command-line string
This commit is contained in:
2025-03-04 13:26:30 +11:00
parent d47f6be401
commit 01602578fd
2 changed files with 22 additions and 10 deletions

View File

@@ -4,15 +4,15 @@
#include <stdint.h>
#include <Windows.h>
typedef struct {
FILE* in;
FILE* out;
FILE* err;
FILE* in = NULL;
FILE* out= NULL;
FILE* err= NULL;
// OS-dependent handle to the process
uint32_t _proc_hdl;
uint32_t _proc_hdl = -1;
} uniproc_process;
uniproc_process uniproc_create_process(const char* cmd);
uniproc_process uniproc_create_process(const char* cmd, const size_t num_args, const char** argv);
void uniproc_await_processes(uniproc_process* p, int* return_codes, size_t num_processes);
void uniproc_close_process(uniproc_process* p);