Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
monitor: delay monitor iothread creation
Commit d32749d moved the call to monitor_init_globals() to before os_daemonize(), making it an unsuitable place to spawn the monitor iothread as it won't be inherited over the fork() in os_daemonize(). We now spawn the thread the first time we instantiate a monitor which actually has use_io_thread == true. Instantiation of monitors happens only after os_daemonize(). We still need to create the qmp_dispatcher_bh when not using iothreads, so this now still happens in monitor_init_globals(). Signed-off-by: Wolfgang Bumiller <[email protected]> Fixes: d32749d ("monitor: move init global earlier") Message-Id: <[email protected]> Reviewed-by: Eric Blake <[email protected]> Reviewed-by: Peter Xu <[email protected]> Tested-by: Peter Xu <[email protected]> [This fixes a crash on shutdown with --daemonize] Signed-off-by: Markus Armbruster <[email protected]>
- Loading branch information