summaryrefslogtreecommitdiff
path: root/lib/libc/unistd/execvp.c
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-07 22:22:16 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-07 22:22:16 +0100
commit8f9e448b2ef6db7cd905540c21f3c5b190e7a1e7 (patch)
treeae0285dd15042d1e9236a5ce2e60daf65acbdca0 /lib/libc/unistd/execvp.c
parentfc00c656c96528112d05cf0edf8631bd5eaea446 (diff)
Add bin/true and bin/false implementations
- Added assembly implementations for `true` and `false` commands. - Updated Kbuild files to include new binaries. - Removed unused libraries and headers. - Cleaned up makefile and unused code.
Diffstat (limited to 'lib/libc/unistd/execvp.c')
-rw-r--r--lib/libc/unistd/execvp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/unistd/execvp.c b/lib/libc/unistd/execvp.c
index 2ce69354..ae8ecdb9 100644
--- a/lib/libc/unistd/execvp.c
+++ b/lib/libc/unistd/execvp.c
@@ -3,6 +3,7 @@
#include <string.h>
#include <unistd.h>
#include <stdio.h>
+#include <stdlib.h>
extern char **environ;
@@ -17,7 +18,7 @@ int execvp(const char *file, char *const argv[])
return execv(file, argv);
} else {
char *ptr;
- char *path = NULL; // TODO: getenv
+ char *path = getenv("PATH");
if (path == NULL || *path == '\0') {
path = "/bin";