michael@0: #include michael@0: #include "prenv.h" michael@0: michael@0: int main(int argc, char* argv[]) michael@0: { michael@0: if (argc != 2) michael@0: return 1; michael@0: michael@0: const char* value = PR_GetEnv("WRITE_ARGUMENT_FILE"); michael@0: michael@0: if (!value) michael@0: return 2; michael@0: michael@0: FILE* outfile = fopen(value, "w"); michael@0: if (!outfile) michael@0: return 3; michael@0: michael@0: // We only need to write out the first argument (no newline). michael@0: fputs(argv[argc -1], outfile); michael@0: michael@0: fclose(outfile); michael@0: michael@0: return 0; michael@0: }