summaryrefslogtreecommitdiff
path: root/userspace/pwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'userspace/pwd.c')
-rw-r--r--userspace/pwd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/userspace/pwd.c b/userspace/pwd.c
new file mode 100644
index 0000000..3bc3002
--- /dev/null
+++ b/userspace/pwd.c
@@ -0,0 +1,9 @@
+#include <stdio.h>
+
+int main()
+{
+ char buf[256];
+ printf("current pwd=%s\n",getwd(buf));
+ chdir("/usr/share");
+ printf("changed pwd=%s\n",getwd(buf));
+}