Hi Ian, * Ian Jackson <ijack...@chiark.greenend.org.uk> [2025-01-29 12:46]:
Steps to reproduce:With some kind of image tarball bookworm.tar $ autopkgtest-virt-unshare -t bookworm.tar ok open ok /tmp/autopkgtest.HYR0W4 print-execute-command Then in another terminal, using that command with the commas replaced with spaces: $ unshare --map-auto --map-root-user --user --mount -- /usr/share/autopkgtest/lib/unshare-helper /tmp/tmp_8rqn1g5 -- sleep 12345 Observe with ps -efH | grep sleep that the sleep 12345 is running. Now, in the autopkgtest-virt-unshare terminal, close Expected behaviour: The sleep is killed. The unshare rune exits. Then "ok" from autopkgtest-virt-unshare Actual behaviour "ok" from autopkgtest-virt-unshare. But, the sleep and the unshare rune are still running.
Note that autopkgtest-virt-unshare does not open some session and the unshare syscall only changes the user namespaces for the inside processes. Thus running unshare in another terminal is completely unrelated to the autopkgtest-virt-unshare except that both share the same chroot directory in /tmp/tmp_8rqn1g5.
This sounds like a x/y problem, can you describe why you are doing this?
Cheers Jochen
signature.asc
Description: PGP signature