[X2Go-Commits] [live-build-x2go] 06/08: this will now properly terminate all backgrounded child processes when X11 dies

git-admin at x2go.org git-admin at x2go.org
Mon Jan 29 22:54:30 CET 2024


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch heuler/openbox-magic-pixel-workaround-bookworm
in repository live-build-x2go.

commit d5c76d0d470826b451f8cc82d9012e528a21d9f0
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date:   Tue Jan 23 21:45:04 2024 +0100

    this will now properly terminate all backgrounded child processes when X11 dies
---
 .../includes.chroot/etc/X11/Xsession.d/60x11-magic-pixel-workaround   | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-magic-pixel-workaround b/config/includes.chroot/etc/X11/Xsession.d/60x11-magic-pixel-workaround
index 863b3fe..b52ef40 100644
--- a/config/includes.chroot/etc/X11/Xsession.d/60x11-magic-pixel-workaround
+++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-magic-pixel-workaround
@@ -6,6 +6,8 @@ if grep 'nomagicpixel=2' /proc/cmdline ; then
 		done ;
 		echo -en "\n$(date +'%F | %T | ')'$0' spawning window foreground monitor (magic-pixel-fix 2)." | tee -a /dev/tty8
 		xdotool search --class X2GoAgent behave %@ blur windowmap || xdotool search --class NXAgent behave %@ blur windowmap
+		# exit if X11 is no longer running, else sleep for a bit
+		ps -C Xorg || exit 0
 	done &
 elif grep 'nomagicpixel=1' /proc/cmdline ; then
 	echo -en "\n$(date +'%F | %T | ')'$0' spawning openbox monitor (magic-pixel-fix 1)." | tee -a /dev/tty8
@@ -18,6 +20,8 @@ elif grep 'nomagicpixel=1' /proc/cmdline ; then
 			killall openbox
 			echo -en "\n$(date +'%F | %T | ')'$0' killed OpenBox." | tee -a /dev/tty8
 		done
+		# exit if X11 is no longer running, else sleep for a bit
+		ps -C Xorg || exit 0
 		sleep 1 # to save cpu cycles
 	done &
 else

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git


More information about the x2go-commits mailing list