fx.diagnostics: process: implement environment management

This commit is contained in:
2026-07-12 22:14:57 +01:00
parent 5c837abc6c
commit e9a1bfbde2
3 changed files with 230 additions and 26 deletions
+6 -4
View File
@@ -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,