diff options
Diffstat (limited to 'bin/sh/main.c')
-rw-r--r-- | bin/sh/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/sh/main.c b/bin/sh/main.c index cfdfe9d..5ad69f2 100644 --- a/bin/sh/main.c +++ b/bin/sh/main.c @@ -155,6 +155,8 @@ main(int argc, char *argv[]) procargs(argc, argv); if (getpwd() == NULL && iflag) out2str("sh: cannot determine working directory\n"); + if (getpwd() != NULL) + setvar ("PWD", getpwd(), VEXPORT); if (argv[0] && argv[0][0] == '-') { state = 1; read_profile("/etc/profile"); |