syscalls: implement argv and envp handling in execve
This commit is contained in:
+2
-2
@@ -9,10 +9,10 @@ int main() {
|
||||
|
||||
// Arguments for the new program
|
||||
// The first argument is conventionally the program name
|
||||
char *argv[] = {NULL}; //{ "./callee", "first_arg", "second_arg", NULL };
|
||||
char *argv[] = { "./callee", "first_arg", "second_arg", NULL };
|
||||
|
||||
// Environment variables for the new program
|
||||
char *envp[] = {NULL}; //{ "CUSTOM_VAR=Hello from caller!", "ANOTHER_VAR=123", NULL };
|
||||
char *envp[] = { "CUSTOM_VAR=Hello from caller!", "ANOTHER_VAR=123", NULL };
|
||||
|
||||
// The execve system call
|
||||
// The first argument is the path to the executable
|
||||
|
||||
Reference in New Issue
Block a user