From: Ben Pfaff Date: Wed, 14 Jan 2009 00:21:18 +0000 (-0800) Subject: leak-checker: Make output file unbuffered. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ef4c9d53816bc9975f366b10105377cc3cab56e;p=openvswitch leak-checker: Make output file unbuffered. This way, we get an up-to-date record when the process is killed. --- diff --git a/lib/leak-checker.c b/lib/leak-checker.c index bdff3247..a50d5c88 100644 --- a/lib/leak-checker.c +++ b/lib/leak-checker.c @@ -113,6 +113,7 @@ leak_checker_start(const char *file_name) file_name, strerror(errno)); return; } + setvbuf(file, NULL, _IONBF, 0); VLOG_WARN("enabled memory leak logging to \"%s\"", file_name); get_hooks(&libc_hooks); set_hooks(&our_hooks);