[PATCH spice-streaming-agent 2/4] Enable line buffering instead of full buffering for the log

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Allows to kill the process without losing log lines

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 src/spice-streaming-agent.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/spice-streaming-agent.cpp b/src/spice-streaming-agent.cpp
index 56c1582..419ff3b 100644
--- a/src/spice-streaming-agent.cpp
+++ b/src/spice-streaming-agent.cpp
@@ -565,6 +565,7 @@ int main(int argc, char* argv[])
                    log_filename, strerror(errno));
             return EXIT_FAILURE;
         }
+        setlinebuf(f_log);
         for (const std::string& arg: old_args) {
             STAT_LOG("Args: %s", arg.c_str());
         }
-- 
2.14.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]