summaryrefslogtreecommitdiff
path: root/kernel/source/syscall.cpp
diff options
context:
space:
mode:
authorBenji Dial <benji@benjidial.net>2024-07-31 17:16:21 -0400
committerBenji Dial <benji@benjidial.net>2024-07-31 17:16:21 -0400
commite6915fb6dd715e39e37702a6d69c220c0f1798bf (patch)
tree2e3b59335f70f2725802d254168ceaee85faf891 /kernel/source/syscall.cpp
parentb1cf9e5dfbc8967bd7cb2a22ec1e5e521f4e0e6e (diff)
downloadhilbert-os-e6915fb6dd715e39e37702a6d69c220c0f1798bf.tar.gz
remove argc, argv; arguments will be passed via environment variables
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));