abuild: kill all childs when bwrap exits

--unshare-pid is needed for --die-with-parent to work correctly.

Ref https://github.com/containers/bubblewrap/issues/529
This commit is contained in:
Sertonix 2024-06-24 16:35:36 +02:00 committed by Natanael Copa
parent 8eaa065f3a
commit 0a91a31e47
1 changed files with 1 additions and 0 deletions

View File

@ -2567,6 +2567,7 @@ rootbld() {
local bwrap_opts=""
options_has "net" || bwrap_opts="$bwrap_opts --unshare-net"
bwrap --new-session --unshare-ipc --unshare-uts $bwrap_opts \
--unshare-pid --die-with-parent \
--ro-bind "$BUILD_ROOT" / \
--proc /proc \
--dev-bind /dev /dev \