From 43b8ee70fcedfb1a2c3ef996cea4842e06e020b0 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Tue, 7 Apr 2020 13:10:01 +0200 Subject: reap the glxtest child even if OpenGL is not used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit E.g. with Skia enabled (thus blocking OpenGL) the zombie stays around. Change-Id: I9769ec804e4727189bbfe58d415e8ad3a6b234ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91811 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- vcl/source/opengl/OpenGLHelper.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'vcl/source/opengl/OpenGLHelper.cxx') diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index 60f023b7dc4c..1ea130942ba0 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #if defined UNX && !defined MACOSX && !defined IOS && !defined ANDROID && !defined HAIKU #include @@ -903,11 +904,26 @@ PreDefaultWinNoOpenGLZone::~PreDefaultWinNoOpenGLZone() bTempOpenGLDisabled = false; } +static void reapGlxTest() +{ + // Reap the glxtest child, or it'll stay around as a zombie, + // as X11OpenGLDeviceInfo::GetData() will not get called. + static bool bTestReaped = false; + if(!bTestReaped) + { + reap_glxtest_process(); + bTestReaped = true; + } +} + bool OpenGLHelper::isVCLOpenGLEnabled() { // Skia always takes precedence if enabled if( SkiaHelper::isVCLSkiaEnabled()) + { + reapGlxTest(); return false; + } /** * The !bSet part should only be called once! Changing the results in the same @@ -965,6 +981,8 @@ bool OpenGLHelper::isVCLOpenGLEnabled() if (bRet) WatchdogThread::start(); + else + reapGlxTest(); CrashReporter::addKeyValue("UseOpenGL", OUString::boolean(bRet), CrashReporter::Write); -- cgit