summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-06-24 04:44:31 -0400
committerIan Moffett <ian@osmora.org>2025-06-24 04:44:31 -0400
commit88845750041260523fe35c4f8b4bca7f5890e45b (patch)
treef15b53c18fcb289c9759ebe8795a3b890a303176
parent68fbcd77640d840e60bf9851ae12d20e8178854a (diff)
usr.bin: osh: Clear argv after script command
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--usr.bin/osh/osh.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/osh/osh.c b/usr.bin/osh/osh.c
index 04705f7..aa8ef27 100644
--- a/usr.bin/osh/osh.c
+++ b/usr.bin/osh/osh.c
@@ -356,6 +356,9 @@ open_script(const char *pathname)
buf[buf_i] = '\0';
argc = parse_args(buf, argv, sizeof(argv));
command_match(buf, argc, argv, true);
+
+ argv[0] = NULL;
+ argv[1] = NULL;
buf_i = 0;
continue;
}