From: Ben Pfaff Date: Thu, 30 Apr 2009 21:37:19 +0000 (-0700) Subject: leak-checker: Make output line-buffered. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d5fc7fbdf92f6e46a8e7058391dbe19ae49c672;p=openvswitch leak-checker: Make output line-buffered. Unbuffered output was ideal from the viewpoint of getting the maximum amount of output when the process was killed, but it causes a dozen or more system calls per log entry. Line buffering should be a reasonable compromise. --- diff --git a/lib/leak-checker.c b/lib/leak-checker.c index 2a16211d..fbca299d 100644 --- a/lib/leak-checker.c +++ b/lib/leak-checker.c @@ -114,7 +114,7 @@ leak_checker_start(const char *file_name) file_name, strerror(errno)); return; } - setvbuf(file, NULL, _IONBF, 0); + setvbuf(file, NULL, _IOLBF, 0); VLOG_WARN("enabled memory leak logging to \"%s\"", file_name); get_hooks(&libc_hooks); set_hooks(&our_hooks);