repo.or.cz
/
NixPkgs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
biome: 1.9.2 -> 1.9.3
[NixPkgs.git]
/
pkgs
/
test
/
make-binary-wrapper
/
envcheck.c
blob
848fbdaa80f26c04e89c2f7122e430a5d5da7f9c
1
#include <limits.h>
2
#include <stdio.h>
3
#include <unistd.h>
4
5
int
main
(
int
argc
,
char
**
argv
,
char
**
envp
) {
6
for
(
char
**
env
=
envp
; *
env
!=
0
; ++
env
) {
7
puts
(*
env
);
8
}
9
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
;
16
}
17
18
for
(
int
i
=
0
;
i
<
argc
; ++
i
) {
19
puts
(
argv
[
i
]);
20
}
21
return
0
;
22
}