mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-11 04:46:07 -08:00
fix(appimage): check mount exe links one at a time for uutils
- uutils readlink (Ubuntu 26.04+) aborts at the first unreadable /proc/<pid>/exe, so the keepalive released the mount early - Add mount_busy helper that readlinks each link individually - Add changelog fragment
This commit is contained in:
2 files changed
+15
-1
No files matched your search
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: linux
|
||||||
|
|
||||||
|
- Fixed AppImage builds on Ubuntu 26.04+ (uutils coreutils) releasing their mount before Chromium child processes finished shutting down, which brought back "Service Crash" notifications on quit.
|
||||||
@@ -52,13 +52,23 @@ if [ -z "$app_run" ]; then
|
|||||||
kill "$holder" 2>/dev/null
|
kill "$holder" 2>/dev/null
|
||||||
run_direct "$@"
|
run_direct "$@"
|
||||||
fi
|
fi
|
||||||
|
# One readlink per link: uutils readlink (Ubuntu 26.04+) aborts at the first
|
||||||
|
# unreadable operand, and other users' /proc/<pid>/exe are always unreadable.
|
||||||
|
mount_busy() {
|
||||||
|
for exe in /proc/[0-9]*/exe; do
|
||||||
|
case "$(readlink "$exe" 2>/dev/null)" in
|
||||||
|
"$mount_point"/*) return 0 ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
APPDIR="$mount_point" "$app_run" "$@"
|
APPDIR="$mount_point" "$app_run" "$@"
|
||||||
rc=$?
|
rc=$?
|
||||||
# Do not release the mount while any process still executes from it; releasing
|
# Do not release the mount while any process still executes from it; releasing
|
||||||
# early SIGBUSes Chromium children that are mid-shutdown.
|
# early SIGBUSes Chromium children that are mid-shutdown.
|
||||||
tries=0
|
tries=0
|
||||||
while [ "$tries" -lt 100 ]; do
|
while [ "$tries" -lt 100 ]; do
|
||||||
if readlink /proc/[0-9]*/exe 2>/dev/null | grep -qF "$mount_point/"; then
|
if mount_busy; then
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
tries=$((tries + 1))
|
tries=$((tries + 1))
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user