Skip to content
Snippets Groups Projects
Commit 3fef839f authored by Dan Fandrich's avatar Dan Fandrich
Browse files

Added call to setvbuf (disabled by default for speed) to flush the

memdebug log file after every line and avoid losing the last few log
entries if curl crashes.
parent ea43bb01
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,10 @@ void curl_memdebug(const char *logname)
logfile = fopen(logname, "w");
else
logfile = stderr;
#ifdef MEMDEBUG_LOG_SYNC
/* Flush the log file after every line so the log isn't lost in a crash */
setvbuf(logfile, (char *)NULL, _IOLBF, 0);
#endif
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment