summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/vl.c b/vl.c
index 9c2619f271..383be1b617 100644
--- a/vl.c
+++ b/vl.c
@@ -2945,7 +2945,7 @@ int main(int argc, char **argv, char **envp)
bdrv_init_with_whitelist();
- autostart= 1;
+ autostart = 1;
/* first pass of option parsing */
optind = 1;
@@ -3899,8 +3899,10 @@ int main(int argc, char **argv, char **envp)
qemu_set_log(mask);
}
- if (!trace_backend_init(trace_events, trace_file)) {
- exit(1);
+ if (!is_daemonized()) {
+ if (!trace_backend_init(trace_events, trace_file)) {
+ exit(1);
+ }
}
/* If no data_dir is specified then try to find it relative to the
@@ -4399,6 +4401,12 @@ int main(int argc, char **argv, char **envp)
os_setup_post();
+ if (is_daemonized()) {
+ if (!trace_backend_init(trace_events, trace_file)) {
+ exit(1);
+ }
+ }
+
main_loop();
bdrv_close_all();
pause_all_vcpus();