Home | History | Annotate | Download | only in sh

Lines Matching refs:pwd

52  * The cd and pwd commands.
103 error("PWD not set");
263 setvar("PWD", curdir, VEXPORT);
265 unsetvar("PWD", 0);
295 setvar("PWD", curdir, VEXPORT);
300 * Posix says the default should be 'pwd -L' (as below), however
323 setvar("PWD", curdir, VEXPORT);
341 char *pwd;
350 pwd = getenv("PWD");
351 if (pwd && *pwd == '/' && stat(".", &stdot) != -1 &&
352 stat(pwd, &stpwd) != -1 &&
355 curdir = savestr(pwd);
369 char *pwd;
374 * to /bin/pwd. This creates a problem for us, since we cannot
378 * the user can still break out of it by killing the pwd program.
381 * /bin/pwd.
385 pwd = stalloc(i);
386 if (getcwd(pwd, i) != NULL) {
387 curdir = savestr(pwd);
390 stunalloc(pwd);
404 pwd = stalloc(MAXPWD);
416 (void) execl("/bin/pwd", "pwd", (char *)0);
417 sh_warn("Cannot exec /bin/pwd");
422 p = pwd;
423 while ((i = read(pip[0], p, pwd + MAXPWD - p)) > 0
433 if (i < 0 || p == pwd || p[-1] != '\n') {
438 error("pwd command failed");
442 curdir = savestr(pwd);