Lines Matching defs:cwd
49 * Once we've computed a cwd and a relative path, we use try_exec() to
54 try_exec(struct ps_prochandle *P, const char *cwd, const char *path, char *buf,
60 (void) snprintf(buf, PATH_MAX, "%s/%s", cwd, path);
86 char cwd[PATH_MAX * 2];
103 * interpreted as the directory to use as an alternate cwd for
116 * At this point 'aout' is either "." or an alternate cwd. We use
120 if (realpath(aout, cwd) == NULL)
121 (void) strcpy(cwd, ".");
127 * basename appended to our cwd. If that also fails, and the process
128 * is in a zone, try again with the zone path instead of our cwd.
135 if (try_exec(P, cwd, path, buf, isexec, isdata))
139 try_exec(P, cwd, p, buf, isexec, isdata))
147 * try_exec() only combines its cwd and path arguments
171 if (try_exec(P, cwd, path, buf, isexec, isdata))
175 try_exec(P, cwd, p, buf, isexec, isdata))
187 if (try_exec(P, cwd, path, buf, isexec, isdata))
191 try_exec(P, cwd, p, buf, isexec, isdata))
199 if (Pgetenv(P, "PATH", cwd, sizeof (cwd)) != NULL) {
220 for (p = strtok_r(cwd, ":", &q); p != NULL;