52 for (i = 0; i < plus.
len; ++i)
56 e = (
char **)
alloc((elen + 1) *
sizeof(
char *));
64 for (i = 0; i < plus.
len; ++i)
67 for (t = 0; t < elen; ++t)
69 if (e[t][split] ==
'=') {
74 if (plus.
s[j + split])
75 e[elen++] = plus.
s + j;
84void pathexec_run(
const char *file,
char *
const *argv,
char *
const *envp)
91 execve(file,argv,envp);
96 if (!path) path =
"/bin:/usr/bin";
108 execve(tmp.
s,argv,envp);
109 if (errno != ENOENT) {
111 if ((errno != EACCES) && (errno != EPERM) && (errno != EISDIR))
return;
115 if (savederrno) errno = savederrno;
int pathexec_env(const char *s, const char *t)
void pathexec(char *const *argv)
int pathexec_multienv(stralloc *sa)
void pathexec_run(const char *file, char *const *argv, char *const *envp)
void * alloc(unsigned int)
#define byte_equal(s, n, t)
unsigned int str_chr(const char *, int)
int stralloc_copyb(stralloc *, const char *, unsigned int)
int stralloc_cat(stralloc *, stralloc *)
int stralloc_cats(stralloc *, const char *)
int stralloc_copys(stralloc *, const char *)