Skip to content

Implement -run-with exit-with-parent=on

Richard W.M. Jones qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 6 repliesIn review
  2. v12 patches 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Implement -run-with exit-with-parent=oninclude/qemu/exit-with-parent.h qemu-options.hx system/exit-with-parent.c +2 more+222 -25 replies
2/2tests/qtest: Use exit-with-parent=on in qtest invocationstests/qtest/libqtest.c+4 -181 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchDaniel P. Berrangé
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] Implement -run-with exit-with-parent=on

v1 was here:

https://lists.gnu.org/archive/html/qemu-devel/2025-10/msg00762.html

In v2:

- Fix unused variable warning.

- Remove the #ifdefs from the libqtest.c code.

- Add the missing S-o-B in the second patch.

- Rebase and retest.

As before, one test fails both before and after this change:

4/405 qemu:func-quick+func-x86_64 / func-x86_64-bad_vmstate ERROR 0.15s exit status 1

And as before, some questions:

- There's no way to find out if the qemu binary supports exit-with-parent=on except to try it. Maybe this should be exposed somehow?

- Or should we have exit-with-parent=best ?

- On macOS I wasn't able to find a satisfactory way to force shutdown, except calling 'qemu_system_killed' and pretending we'd been killed by SIGTERM (which does at least emulate what Linux & FreeBSD do). I suppose it'd be nice if there was a "killed by parent" reason which also forced shutdown.

Rich.