From: "Richard W.M. Jones" <rjones@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com
Subject: Re: [PATCH WIP] Implement -run-with exit-with-parent=on
Date: Wed, 1 Oct 2025 20:14:16 +0100 [thread overview]
Message-ID: <20251001191416.GP1460@redhat.com> (raw)
In-Reply-To: <aN1z2C__6M8E7I8L@redhat.com>
> > +int
> > +set_exit_with_parent(void)
> > +{
> > + int r;
> > + pthread_attr_t attrs;
> > + pthread_t exit_with_parent_thread;
> > +
> > + /*
> > + * We have to block waiting for kevent, so that requires that we
> > + * start a background thread.
> > + */
> > + pthread_attr_init(&attrs);
> > + pthread_attr_setdetachstate(&attrs, PTHREAD_CREATE_DETACHED);
> > + r = pthread_create(&exit_with_parent_thread, NULL,
> > + exit_with_parent_loop, NULL);
>
>
> QemuThread exit_with_parent_thread;
> qemu_thread_create(&exit_with_parent_thread,
> "exit-parent",
> exit_with_parent_loop,
> QEMU_THREAD_DETACHED);
>
> mostly just so we get the thread name set.
Right, this (macOS) is the part I didn't even compile test yet, hence
why the patch is WIP. We do compile the same code in nbdkit, but I
could be sure it'll work in macOS. I'll make sure to fix this to make
it qemu-native, and test it before posting the real patch :-)
> Broadly looks good to me.
Thanks, I'll incorporate all those suggestions into the real version.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
prev parent reply other threads:[~2025-10-01 19:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-01 17:40 [PATCH WIP] Implement -run-with exit-with-parent=on Richard W.M. Jones
2025-10-01 18:32 ` Daniel P. Berrangé
2025-10-01 19:14 ` Richard W.M. Jones [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251001191416.GP1460@redhat.com \
--to=rjones@redhat.com \
--cc=berrange@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.