From af51a7a94a9548765a97f7b7ae198c849b07b050 Mon Sep 17 00:00:00 2001 From: Mystery Man Date: Fri, 7 Mar 2003 17:32:04 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'V9_1_18mdk'. --- mdk-stage1/dietlibc/lib/execvp.c | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 mdk-stage1/dietlibc/lib/execvp.c (limited to 'mdk-stage1/dietlibc/lib/execvp.c') diff --git a/mdk-stage1/dietlibc/lib/execvp.c b/mdk-stage1/dietlibc/lib/execvp.c deleted file mode 100644 index 20521d69f..000000000 --- a/mdk-stage1/dietlibc/lib/execvp.c +++ /dev/null @@ -1,38 +0,0 @@ -#include -#include -#include -#include -#include -#include "exec_lib.h" - -int execvp(const char *file, char *const argv[]) { - char *path=getenv("PATH"); - char *cur,*next; - char buf[PATH_MAX]; - if (strchr((char*)file,'/')) { - if (execve(file,argv,environ)==-1) { - if (errno==ENOEXEC) __exec_shell(file,argv); - return -1; - } - } - if (!path) path=_PATH_DEFPATH; - for (cur=path; cur; cur=next) { - next=strchr(cur,':'); - if (!next) - next=cur+strlen(cur); - if (next==cur) { - buf[0]='.'; - cur--; - } else - memmove(buf,cur,next-cur); - buf[next-cur]='/'; - memmove(&buf[next-cur+1],file,strlen(file)+1); - if (execve(buf,argv,environ)==-1) { - if (errno==ENOEXEC) return __exec_shell(buf,argv); - if ((errno!=EACCES) && (errno!=ENOENT)) return -1; - } - if (*next==0) break; - next++; - } - return -1; -} -- cgit v1.2.1