From 6dd337592479e2c33322144252fef4b00654deed Mon Sep 17 00:00:00 2001 From: kicer Date: Sun, 6 Sep 2026 12:04:05 +0800 Subject: [PATCH] =?UTF-8?q?fix=20/app/server.js=E5=8F=AF=E8=AF=BB=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- executor/server.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/executor/server.js b/executor/server.js index 3469d75..156903b 100644 --- a/executor/server.js +++ b/executor/server.js @@ -131,7 +131,11 @@ function isolatedCommand(command, cwd) { 'mount --bind /dev/null /proc/sysrq-trigger', 'mount --bind /proc/sys /proc/sys', 'mount -o remount,bind,ro /proc/sys', - ...(hideWorkdir ? ['mount -t tmpfs tmpfs ' + shq(APP_DIR)] : []), + ...(hideWorkdir ? [ + 'mount -t tmpfs tmpfs ' + shq(APP_DIR), + // 防止 umount /app:bind mount 到自己,制造"子挂载"使内核引用计数 > 0 + 'mount --bind ' + shq(APP_DIR) + ' ' + shq(APP_DIR), + ] : []), 'anchor=$(mktemp -d /tmp/.exanchor.XXXXXXXXXX)', 'mount --bind ' + shq(sessionRoot) + ' "$anchor"', 'mount -t tmpfs tmpfs ' + shq(DEFAULT_CWD),