VirtualBox

Changeset 78816 in vbox for trunk


Ignore:
Timestamp:
May 28, 2019 1:06:56 PM (6 years ago)
Author:
vboxsync
Message:

Additions/crOpenGL/load.c: Don't hang on exit if stubSPUSafeTearDown() is called on the sync thread due to an X11 error for example

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/load.c

    r78408 r78816  
    469469        ASMAtomicWriteBool(&stub.bShutdownSyncThread, true);
    470470        {
    471             int rc = RTThreadWait(stub.hSyncThread, RT_INDEFINITE_WAIT, NULL);
    472             if (RT_FAILURE(rc))
     471            /* stubSPUSafeTearDown() can be called from the sync thread in case
     472             * of an X11 error:
     473             *     XGetGeometry() -> [...] -> _XError() -> exit() -> [...] -> stubExitHandler() -> stubSPUSafetearDown())
     474             * Don't hang in that case.
     475             */
     476            RTTHREAD hSelf = RTThreadSelf();
     477            if (hSelf != stub.hSyncThread)
    473478            {
    474                 WARN(("RTThreadWait_join failed %i", rc));
     479                int rc = RTThreadWait(stub.hSyncThread, RT_INDEFINITE_WAIT, NULL);
     480                if (RT_FAILURE(rc))
     481                    WARN(("RTThreadWait_join failed %i", rc));
    475482            }
    476483        }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette