diff --git a/userland/posix/environ.c b/userland/posix/environ.c new file mode 100644 index 0000000..39ef1cb --- /dev/null +++ b/userland/posix/environ.c @@ -0,0 +1,15 @@ +/* Print all environment variables. */ + +#include +#include + +extern char **environ; + +int main(void) { + char **env = environ; + while (*env) { + printf("%s\n", *env); + env++; + } + return EXIT_SUCCESS; +}