Lines Matching refs:path

49  * Once we've computed a cwd and a relative path, we use try_exec() to
50 * form an absolute path, call resolvepath() on it, and then let the
54 try_exec(struct ps_prochandle *P, const char *cwd, const char *path, char *buf,
59 if (path[0] != '/')
60 (void) snprintf(buf, PATH_MAX, "%s/%s", cwd, path);
62 (void) strcpy(buf, path);
87 char path[PATH_MAX];
91 char *p = path, *q;
128 * is in a zone, try again with the zone path instead of our cwd.
131 Pread_string(P, path, sizeof (path), (off_t)addr) > 0) {
135 if (try_exec(P, cwd, path, buf, isexec, isdata))
138 if (strchr(path, '/') != NULL && (p = basename(path)) != NULL &&
147 * try_exec() only combines its cwd and path arguments
148 * if path is relative; but in our case even an absolute
149 * path inside a zone is a relative path from the global
151 * absolute path into a relative path here before
154 p = (path[0] == '/') ? path + 1 : path;
165 (void) strncpy(path, P->psinfo.pr_psargs, PRARGSZ);
166 path[PRARGSZ] = '\0';
168 if ((p = strchr(path, ' ')) != NULL)
171 if (try_exec(P, cwd, path, buf, isexec, isdata))
174 if (strchr(path, '/') != NULL && (p = basename(path)) != NULL &&
185 Pread_string(P, path, sizeof (path), (off_t)addr) > 0) {
187 if (try_exec(P, cwd, path, buf, isexec, isdata))
190 if (strchr(path, '/') != NULL && (p = basename(path)) != NULL &&
206 (void) strncpy(path, P->psinfo.pr_psargs, PRARGSZ);
207 path[PRARGSZ] = '\0';
209 if ((p = strchr(path, ' ')) != NULL)
212 if (strchr(path, '/') != NULL || strncmp(path,
214 (void) strcpy(path, P->psinfo.pr_fname);
226 if (try_exec(P, p, path, buf, isexec, isdata))