summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2008-05-23 03:07:01 +0000
committerDimitri Sokolyuk <demon@dim13.org>2008-05-23 03:07:01 +0000
commit50c8c5d9470968b153adcdaa5b1f2f109ae2999b (patch)
tree03b0420bbac1f69d8a59176e3b0d15aaa9c6fa7a
parent1b33e67300ee164645fe888004e3033fb00d1acb (diff)
list all environment valiables
-rw-r--r--env/Makefile8
-rw-r--r--env/env.c19
2 files changed, 27 insertions, 0 deletions
diff --git a/env/Makefile b/env/Makefile
new file mode 100644
index 0000000..b200e92
--- /dev/null
+++ b/env/Makefile
@@ -0,0 +1,8 @@
+# $Id$
+
+PROG= env
+CFLAGS+= -Wall
+NOMAN=
+BINDIR= /var/www/cgi-bin
+
+.include <bsd.prog.mk>
diff --git a/env/env.c b/env/env.c
new file mode 100644
index 0000000..6916d7e
--- /dev/null
+++ b/env/env.c
@@ -0,0 +1,19 @@
+/* $Id$ */
+
+#include <stdio.h>
+
+int
+main(int argc, char **argv, char **envp)
+{
+ printf("Content-Type: text/plain\n\n");
+
+ printf("argc: %d\n", argc);
+
+ while (*argv)
+ printf("argv: %s\n", *argv++);
+
+ while (*envp)
+ printf("envp: %s\n", *envp++);
+
+ return 0;
+}