v2 of: https://lists.nongnu.org/archive/html/qemu-devel/2024-11/msg00460.html
diff to v1: - In 2/4 fixed one path where EXIT_FAILURE would be returned, - Reworked 3/4 so that channel initialization is kept in run_agent_once(). Michal Privoznik (4): qga: Don't access global variable in run_agent_once() qga: Invert logic on return value in main() qga: Don't daemonize before channel is initialized qga: Make run_agent() and run_agent_once() return no value qga/main.c | 52 +++++++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 23 deletions(-) -- 2.45.2