summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2022-08-20 17:01:53 +0200
committerLinus Groh <mail@linusgroh.de>2022-08-23 19:00:04 +0100
commit39a3775f4870fb16b49fec24aa5fd506b17a0ea9 (patch)
tree2cd49be1c6563988cf74a67599437d57c7014f67 /Userland/Libraries/LibC
parent61e18c681baacca25dffadeab688730402b6c443 (diff)
downloadserenity-39a3775f4870fb16b49fec24aa5fd506b17a0ea9.zip
Userland: Rely on a single authoritative source for the default `PATH`
Diffstat (limited to 'Userland/Libraries/LibC')
-rw-r--r--Userland/Libraries/LibC/unistd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibC/unistd.cpp b/Userland/Libraries/LibC/unistd.cpp
index 78dcb42e5f..0e44c2df5a 100644
--- a/Userland/Libraries/LibC/unistd.cpp
+++ b/Userland/Libraries/LibC/unistd.cpp
@@ -8,6 +8,7 @@
#include <AK/ScopedValueRollback.h>
#include <AK/String.h>
#include <AK/Vector.h>
+#include <LibCore/File.h>
#include <alloca.h>
#include <assert.h>
#include <bits/pthread_cancel.h>
@@ -186,7 +187,7 @@ int execvpe(char const* filename, char* const argv[], char* const envp[])
ScopedValueRollback errno_rollback(errno);
String path = getenv("PATH");
if (path.is_empty())
- path = "/bin:/usr/bin";
+ path = DEFAULT_PATH;
auto parts = path.split(':');
for (auto& part : parts) {
auto candidate = String::formatted("{}/{}", part, filename);