Add a method to StreamFile to line buffer the file. Use that in "log enable -f file" to line buffer the log output.

llvm-svn: 124107
This commit is contained in:
Jim Ingham
2011-01-24 04:09:25 +00:00
parent 3bbfb7f64b
commit 9f35921baa
3 changed files with 20 additions and 3 deletions

View File

@@ -94,6 +94,13 @@ StreamFile::Open (const char *path, const char *permissions)
return m_file != NULL;
}
void
StreamFile::SetLineBuffered ()
{
if (m_file != NULL)
setlinebuf (m_file);
}
void
StreamFile::Flush ()
{