fx.diagnostics: process: implement environment management
This commit is contained in:
@@ -9,17 +9,19 @@ int main(int argc, const char **argv)
|
||||
const char *exec = argv[1];
|
||||
const char *msg = argv[2];
|
||||
|
||||
const char *args[] = {
|
||||
"hello",
|
||||
"world",
|
||||
const fx_value arg_values[] = {
|
||||
FX_CSTR("hello"),
|
||||
FX_CSTR("world"),
|
||||
};
|
||||
fx_array *args = fx_array_create_with_values(
|
||||
arg_values,
|
||||
sizeof arg_values / sizeof arg_values[0]);
|
||||
|
||||
fx_process *self = fx_process_get_self();
|
||||
const fx_hashtable *env = fx_process_get_environment(self);
|
||||
|
||||
fx_process_start_info info = {
|
||||
.proc_args = args,
|
||||
.proc_args_count = sizeof args / sizeof args[0],
|
||||
.proc_redirect_stdout = true,
|
||||
.proc_redirect_stdin = true,
|
||||
.proc_file_name = exec,
|
||||
|
||||
Reference in New Issue
Block a user