From e6915fb6dd715e39e37702a6d69c220c0f1798bf Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Wed, 31 Jul 2024 17:16:21 -0400 Subject: remove argc, argv; arguments will be passed via environment variables --- kernel/source/syscall.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'kernel/source/syscall.cpp') diff --git a/kernel/source/syscall.cpp b/kernel/source/syscall.cpp index 803f7d2..00590c9 100644 --- a/kernel/source/syscall.cpp +++ b/kernel/source/syscall.cpp @@ -625,8 +625,11 @@ namespace hilbert::kernel::syscall { application::process *p = new application::process(memory, file.dir_entry.name); + for (auto *n = owner->environment_variables.first; n; n = n->next) + p->set_environment_variable(n->value.a, n->value.b); + for (uint64_t i = 0; i < psi->env_var_count; ++i) - p->add_environment_variable( + p->set_environment_variable( utility::string(psi->env_vars[i].name, psi->env_vars[i].name_len), utility::string(psi->env_vars[i].value, psi->env_vars[i].value_len)); -- cgit v1.2.3