From 3e12bafe90509b3813f26b06e3779fbf2c76a254 Mon Sep 17 00:00:00 2001 From: WMCB-Tech Date: Thu, 3 Jun 2021 13:36:08 +0800 Subject: [PATCH] termux-chroot: specify --kill-on-exit option this option terminates all processes when exiting termux-chroot session to avoid hanging when doing exit when there's a daemon that is left running under termux-chroot --- packages/proot/build.sh | 2 +- packages/proot/termux-chroot | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/proot/build.sh b/packages/proot/build.sh index 5b513b9baa..eba61d6cee 100644 --- a/packages/proot/build.sh +++ b/packages/proot/build.sh @@ -5,7 +5,7 @@ TERMUX_PKG_MAINTAINER="@termux" # Just bump commit and version when needed: _COMMIT=8f67d6c7fadb445b7a528020d05e72dba717c5b9 TERMUX_PKG_VERSION=5.1.107 -TERMUX_PKG_REVISION=39 +TERMUX_PKG_REVISION=40 TERMUX_PKG_SRCURL=https://github.com/termux/proot/archive/${_COMMIT}.zip TERMUX_PKG_SHA256=a5d248d307766bb807a35ee88d90456c0d1e0791cecffe5fb5d40d203be663ac TERMUX_PKG_DEPENDS="libtalloc" diff --git a/packages/proot/termux-chroot b/packages/proot/termux-chroot index 1fbb0cc4c4..dd3b0142cf 100755 --- a/packages/proot/termux-chroot +++ b/packages/proot/termux-chroot @@ -20,8 +20,11 @@ do done shift $(($OPTIND-1)) +# Kill processes on exit to avoid hanging on exit +ARGS="--kill-on-exit" + # For the /system/bin/linker(64) to be found: -ARGS="-b /system:/system" +ARGS="$ARGS -b /system:/system" # On some devices /vendor is required for termux packages to work correctly # See https://github.com/termux/proot/issues/2#issuecomment-303995382