aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index 9ce65fc3dd..16418ecf8c 100644
--- a/vl.c
+++ b/vl.c
@@ -3965,6 +3965,8 @@ int main(int argc, char **argv, char **envp)
}
loc_set_none();
+ os_daemonize();
+
if (qemu_init_main_loop()) {
fprintf(stderr, "qemu_init_main_loop failed\n");
exit(1);
@@ -4206,8 +4208,6 @@ int main(int argc, char **argv, char **envp)
}
#endif
- os_daemonize();
-
if (pid_file && qemu_create_pidfile(pid_file) != 0) {
os_pidfile_error();
exit(1);