aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-28 18:51:46 -0400
committerIan Moffett <ian@osmora.org>2024-05-28 18:51:46 -0400
commit6e1634015fa6df1213d7fbaa3b0c2e7b34f08ef2 (patch)
tree6bfff3366a875203adfb5de2cad891bea1dee79c
parent3e50f29f7ec123f80e8687f1b6a1734ead49a3b8 (diff)
kernel: exec: Use dummy envp
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/kern/kern_exec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index a1e97be..202da23 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -59,6 +59,7 @@ __KERNEL_META("$Hyra$: kern_exec.c, Ian Marco Moffett, "
static int
exec_get_args(char **argv, struct exec_args *res)
{
+ static char *dmmy_envp[] = {NULL};
const size_t ARG_LEN = sizeof(char) * ARG_MAX;
char *argp = NULL;
void *tmp;
@@ -76,6 +77,7 @@ exec_get_args(char **argv, struct exec_args *res)
td = this_td();
res->vas = td->addrsp;
+ res->envp = dmmy_envp;
/* Read argv */
copyin((uintptr_t)argv, &argp, sizeof(char *));