Merge pull request #1072 from taosdata/feature/fangdoc

return if fail to open file, otherwise coredump
This commit is contained in:
slguan 2020-01-04 16:35:21 +08:00 committed by GitHub
commit cbb0dd728b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -351,6 +351,11 @@ int main(int argc, char *argv[]) {
}
FILE *fp = fopen(arguments.output_file, "a");
if (NULL == fp) {
fprintf(stderr, "Failed to open %s for writing\n", arguments.output_file);
return 1;
};
time_t tTime = time(NULL);
struct tm tm = *localtime(&tTime);