syscalls: fix page count for mapping in sys_execve and make caller run coreutils
This commit is contained in:
+2
-2
@@ -9,7 +9,7 @@ int main() {
|
||||
|
||||
// Arguments for the new program
|
||||
// The first argument is conventionally the program name
|
||||
char *argv[] = { "./callee", "first_arg", "second_arg", NULL };
|
||||
char *argv[] = { "/katau/core", "--help", NULL };
|
||||
|
||||
// Environment variables for the new program
|
||||
char *envp[] = { "CUSTOM_VAR=Hello from caller!", "ANOTHER_VAR=123", NULL };
|
||||
@@ -18,7 +18,7 @@ int main() {
|
||||
// The first argument is the path to the executable
|
||||
// The second is the array of arguments
|
||||
// The third is the array of environment variables
|
||||
execve("/katau/callee.", argv, envp);
|
||||
execve("/katau/core.", argv, envp);
|
||||
|
||||
// This part of the code will only be reached if execve fails
|
||||
perror("execve failed");
|
||||
|
||||
Reference in New Issue
Block a user