projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea43bb0
)
Added call to setvbuf (disabled by default for speed) to flush the
author
Dan Fandrich
<dan@coneharvesters.com>
Tue, 15 May 2007 00:36:56 +0000
(
00:36
+0000)
committer
Dan Fandrich
<dan@coneharvesters.com>
Tue, 15 May 2007 00:36:56 +0000
(
00:36
+0000)
memdebug log file after every line and avoid losing the last few log
entries if curl crashes.
lib/memdebug.c
patch
|
blob
|
history
diff --git
a/lib/memdebug.c
b/lib/memdebug.c
index
1101694
..
582387c
100644
(file)
--- a/
lib/memdebug.c
+++ b/
lib/memdebug.c
@@
-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
}
}