summaryrefslogtreecommitdiff
path: root/kernel/source/syscall.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/source/syscall.cpp')
-rw-r--r--kernel/source/syscall.cpp5
1 files changed, 4 insertions, 1 deletions
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));