On Wed, Jun 06, 2018 at 10:37:05AM +0200, Igor Mammedov wrote:
[...]
> @@ -4578,6 +4579,13 @@ int main(int argc, char **argv, char **envp)
>      parse_numa_opts(current_machine);
>  
>      /* do monitor/qmp handling at preconfig state if requested */
> +    if (!preconfig_exit_requested && is_daemonized()) {
> +        /* signal parent QEMU to exit, libvirt treats it as a sign
> +         * that monitor socket is ready to accept connections
> +         */
> +        os_setup_post();
> +        os_setup_post_done = true;
> +    }

I liked your version of os_setup_post() in v3, where the
os_setup_post_done check is done inside os_setup_post().

>      main_loop();
>  
>      /* from here on runstate is RUN_STATE_PRELAUNCH */
> @@ -4707,8 +4715,10 @@ int main(int argc, char **argv, char **envp)
>      }
>  
>      accel_setup_post(current_machine);
> -    os_setup_post();
>  
> +    if (!os_setup_post_done) {
> +        os_setup_post();
> +    }
>      main_loop();
>  
>      gdbserver_cleanup();
> -- 
> 2.7.4
> 

-- 
Eduardo

Reply via email to