Lines Matching defs:pwd
53 * The cd and pwd commands.
112 error("PWD not set");
306 setvar("PWD", curdir, VEXPORT);
309 unsetvar("PWD", 0);
343 setvar("PWD", curdir, VEXPORT);
367 * Posix says the default should be 'pwd -L' (as below), however
392 setvar("PWD", curdir, VEXPORT);
419 setvar("PWD", curdir, VEXPORT);
433 char *pwd;
443 * sh startup, so fetching PWD from the entry environment
455 pwd = getenv("PWD");
456 if (is_curdir(pwd)) {
457 curdir = savestr(pwd);
471 char *pwd;
476 * to /bin/pwd. This creates a problem for us, since we cannot
487 * the user can still break out of it by killing the pwd program.
490 * /bin/pwd.
495 pwd = stalloc(i);
496 if (getcwd(pwd, i) != NULL) {
497 curdir = savestr(pwd);
498 stunalloc(pwd);
501 stunalloc(pwd);
515 pwd = stalloc(MAXPWD);
523 (void) execl("/bin/pwd", "pwd", (char *)0);
524 error("Cannot exec /bin/pwd");
528 p = pwd;
529 while ((i = read(pip[0], p, pwd + MAXPWD - p)) > 0
539 if (i < 0 || p == pwd || p[-1] != '\n') {
544 error("pwd command failed");
548 curdir = savestr(pwd);
549 stunalloc(pwd);