Changeset 117 in Main for trunk/Server/main.c
- Timestamp:
- Sep 21, 2024, 5:47:51 PM (8 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Server/main.c
r116 r117 113 113 } 114 114 confpath = argv[i]; 115 } else if(strcmp(argv[i], "--logfile") == 0 || strcmp(argv[i], "-l") == 0) { 116 i++; 117 if(argv[i] == NULL) { 118 fprintf(stderr, "Missing argument\n"); 119 return 1; 120 } 121 if(logfile != NULL && logfile != stderr) { 122 fclose(logfile); 123 } 124 logfile = fopen(argv[i], "a"); 125 if(logfile == NULL) { 126 fprintf(stderr, "Failed to open logfile\n"); 127 return 1; 128 } 115 129 } else if(strcmp(argv[i], "--version") == 0 || strcmp(argv[i], "-V") == 0) { 116 130 printf("Tewi HTTPd Tewi/%s\n", tw_get_version());
Note:
See TracChangeset
for help on using the changeset viewer.