diff options
Diffstat (limited to 'tools/envdump.c')
| -rw-r--r-- | tools/envdump.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/envdump.c b/tools/envdump.c new file mode 100644 index 0000000..4536d00 --- /dev/null +++ b/tools/envdump.c @@ -0,0 +1,17 @@ +#include <unistd.h>
+#include <stdio.h>
+
+int main(int argc, char* argv[], char* envp[]) {
+ char** environ_ = envp;
+
+ FILE* fp = fopen("/tmp/envdump.txt", "w");
+
+ while (*environ_) {
+ fprintf(fp, "%s\n", *environ_);
+ environ_++;
+ }
+
+ fclose(fp);
+
+ return 0;
+}
\ No newline at end of file |
