From d86ab44f5e6222b7866eb5453c85dbe401ab3730 Mon Sep 17 00:00:00 2001 From: Riccardo De Agostini Date: Sat, 20 Apr 2024 15:46:28 +0200 Subject: [PATCH] Kill XVFB when xvfb-run returns --- docker/opt/bin/x11-headless | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/opt/bin/x11-headless b/docker/opt/bin/x11-headless index c799fa0..0a18d6d 100644 --- a/docker/opt/bin/x11-headless +++ b/docker/opt/bin/x11-headless @@ -5,4 +5,7 @@ # then it complaints that "Xvfb cannot start" when it's already running. pgrep -l Xvfb && pkill -e Xvfb || rm -f /tmp/.X99-lock -xvfb-run $@ \ No newline at end of file +xvfb-run $@ + +# Kill XVFB if it is still running (see above). +pgrep -l Xvfb && pkill -e Xvfb || rm -f /tmp/.X99-lock