qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/1] vl.c: do not execute trace_init_backends() before daemon


From: Paolo Bonzini
Subject: Re: [PATCH 1/1] vl.c: do not execute trace_init_backends() before daemonizing
Date: Tue, 5 Jan 2021 19:09:36 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

On 05/01/21 19:03, Daniel Henrique Barboza wrote:
+    /*
+     * The trace backend must be initialized before daemonizing.

after, not before. :)

With this fixed,

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

+     * trace_init_backends() will call st_init(), which will create the
+     * trace thread in the parent, and also register st_flush_trace_buffer()
+     * in atexit(). This function will force the parent to wait for the
+     * writeout thread to finish, which will not occur, and the parent
+     * process will be left in the host.
+     */
+    if (!trace_init_backends()) {
+        exit(1);
+    }
+    trace_init_file();
+




reply via email to

[Prev in Thread] Current Thread [Next in Thread]