Skip to content

Commit

Permalink
run the chroot in a new PID namespace
Browse files Browse the repository at this point in the history
This automatically tears down any processes remaining in the chroot
when we exit. I'm looking at you, gnupg.
  • Loading branch information
falconindy committed Dec 12, 2014
1 parent 02062d2 commit 2be79c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch-chroot.in
Expand Up @@ -29,4 +29,4 @@ shift
api_fs_mount "$chrootdir" || die "failed to setup API filesystems in chroot %s" "$chrootdir"
track_mount /etc/resolv.conf "$chrootdir/etc/resolv.conf" --bind

SHELL=/bin/sh chroot "$chrootdir" "$@"
SHELL=/bin/sh unshare --fork --pid chroot "$chrootdir" "$@"

0 comments on commit 2be79c6

Please sign in to comment.