syscalls: implement getcwd syscall

This commit is contained in:
2025-10-30 20:26:28 +03:00
parent 26c8280059
commit f4b0429062
9 changed files with 192 additions and 11 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[] = { "/katau/core", "--help", NULL };
char *argv[] = { "/katau/dash", "--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/core.", argv, envp);
execve("/katau/dash.", argv, envp);
// This part of the code will only be reached if execve fails
perror("execve failed");