Ilya Leoshkevich <i...@linux.ibm.com> writes: > In case an emulated process execve()s another emulated process, bind() > will fail, because the socket already exists. So try deleting it. Use > the existing unix_listen() function which does this. Link qemu-user > with qemu-sockets.c and add the monitor_get_fd() stub. > <snip> ... > - ret = listen(fd, 1); > - if (ret < 0) { > - perror("listen socket"); > - close(fd); > - return -1; > - } > - > - return fd; > + return unix_listen(path, errp);
Nice ;-) > } > <snip> > diff --git a/util/meson.build b/util/meson.build > index 5d8bef98912..780b5977a89 100644 > --- a/util/meson.build > +++ b/util/meson.build > @@ -84,6 +84,8 @@ if have_block or have_ga > util_ss.add(files('qemu-coroutine.c', 'qemu-coroutine-lock.c', > 'qemu-coroutine-io.c')) > util_ss.add(files(f'coroutine-@coroutine_backend@.c')) > util_ss.add(files('thread-pool.c', 'qemu-timer.c')) > +endif > +if have_block or have_ga or have_user > util_ss.add(files('qemu-sockets.c')) > endif > if have_block I guess have_block is synonymous with have_system: Reviewed-by: Alex Bennée <alex.ben...@linaro.org> -- Alex Bennée Virtualisation Tech Lead @ Linaro