Fixed my previous execvp() endless loop fix, which would always cause
an infinite loop. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24569 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -145,7 +145,7 @@ execvp(const char *file, char* const* argv)
|
|||||||
const char* pathEnd = paths - 1;
|
const char* pathEnd = paths - 1;
|
||||||
while (pathEnd != NULL) {
|
while (pathEnd != NULL) {
|
||||||
paths = pathEnd + 1;
|
paths = pathEnd + 1;
|
||||||
const char* pathEnd = strchr(paths, ':');
|
pathEnd = strchr(paths, ':');
|
||||||
int pathLen = (pathEnd ? pathEnd - paths : strlen(paths));
|
int pathLen = (pathEnd ? pathEnd - paths : strlen(paths));
|
||||||
|
|
||||||
// We skip empty paths and those that would become too long.
|
// We skip empty paths and those that would become too long.
|
||||||
|
|||||||
Reference in New Issue
Block a user