mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-07 02:10:27 +00:00
env.com behaves more like env
It prints its own name to stderr, not stdout. It also prints `GetProgramExecutableName()` for further debugging convenience.
This commit is contained in:
parent
bf952027c3
commit
2b2a38b5ae
1 changed files with 2 additions and 2 deletions
|
@ -2,9 +2,9 @@
|
|||
#include "libc/runtime/runtime.h"
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
printf("%s\n", argv[0]);
|
||||
fprintf(stderr, "%s (%s)\n", argv[0], GetProgramExecutableName());
|
||||
for (char **p = environ; *p; ++p) {
|
||||
printf(" %s\n", *p);
|
||||
printf("%s\n", *p);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue