summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/main.c2
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");
OpenPOWER on IntegriCloud