Lines Matching refs:pwd
341 char *pwd; in getpwd() local
350 pwd = getenv("PWD"); in getpwd()
351 if (pwd && *pwd == '/' && stat(".", &stdot) != -1 && in getpwd()
352 stat(pwd, &stpwd) != -1 && in getpwd()
355 curdir = savestr(pwd); in getpwd()
369 char *pwd; in find_curdir() local
385 pwd = stalloc(i); in find_curdir()
386 if (getcwd(pwd, i) != NULL) { in find_curdir()
387 curdir = savestr(pwd); in find_curdir()
390 stunalloc(pwd); in find_curdir()
404 pwd = stalloc(MAXPWD); in find_curdir()
422 p = pwd; in find_curdir()
423 while ((i = read(pip[0], p, pwd + MAXPWD - p)) > 0 in find_curdir()
433 if (i < 0 || p == pwd || p[-1] != '\n') { in find_curdir()
442 curdir = savestr(pwd); in find_curdir()