Commit 8b49ccac authored by unknown's avatar unknown

Bug#10193

Invalid DataDir in config causes ndbd segfault


ndb/src/kernel/error/ErrorReporter.cpp:
  print error and return error if unable to open the file for error reporting.
parent c758512a
......@@ -237,6 +237,11 @@ WriteMessage(ErrorCategory thrdType, int thrdMessageID,
// Create a new file, and skip the first 69 bytes,
// which are info about the current offset
stream = fopen(theErrorFileName, "w");
if(stream == NULL)
{
fprintf(stderr,"Unable to open error log file: %s\n", theErrorFileName);
return -1;
}
fprintf(stream, "%s%u%s", "Current byte-offset of file-pointer is: ", 69,
" \n\n\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment