syscalls: fix page count for mapping in sys_execve and make caller run coreutils

This commit is contained in:
2025-10-07 23:41:55 +03:00
parent 88c1936e83
commit 26c8280059
2 changed files with 11 additions and 4 deletions
+2 -2
View File
@@ -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");