File: EnvPrinter.c

package info (click to toggle)
ruby-passenger 4.0.53-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 28,668 kB
  • ctags: 70,512
  • sloc: cpp: 264,280; ruby: 25,606; sh: 22,815; ansic: 18,277; python: 767; makefile: 99; perl: 20
file content (16 lines) | stat: -rw-r--r-- 267 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>

extern char **environ;

int
main(int argc, char *argv[]) {
	int i = 0;
	while (environ[i] != NULL) {
		write(STDOUT_FILENO, environ[i], strlen(environ[i]) + 1);
		i++;
	}
	return 0;
}