fluffychat: 1.22.1 -> 1.23.0 (#364091)
[NixPkgs.git] / pkgs / test / make-binary-wrapper / envcheck.c
blob848fbdaa80f26c04e89c2f7122e430a5d5da7f9c
1 #include <limits.h>
2 #include <stdio.h>
3 #include <unistd.h>
5 int main(int argc, char **argv, char **envp) {
6 for (char **env = envp; *env != 0; ++env) {
7 puts(*env);
10 char cwd[PATH_MAX];
11 if (getcwd(cwd, sizeof(cwd))) {
12 printf("CWD=%s\n", cwd);
13 } else {
14 perror("getcwd() error");
15 return 1;
18 for (int i=0; i < argc; ++i) {
19 puts(argv[i]);
21 return 0;