VirtualBox

Changeset 90211 in vbox


Ignore:
Timestamp:
Jul 15, 2021 11:53:07 AM (4 years ago)
Author:
vboxsync
Message:

Additions: X11: main: prevent deadlock on service termination, bugref:10032.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/main.cpp

    r90053 r90211  
    120120        VBClLogFatalError("Failure while acquiring the global critical section, rc=%Rrc\n", rc);
    121121
    122     /* Try to gracefuly terminate a service. Service needs
    123      * to be stopped first and then terminated. */
    124     if (g_Service.pDesc)
    125     {
    126         if (g_Service.pDesc->pfnStop)
    127             g_Service.pDesc->pfnStop();
    128 
    129         if (g_Service.pDesc->pfnTerm)
    130             g_Service.pDesc->pfnTerm();
     122    /* Ask service to stop. */
     123    if (g_Service.pDesc &&
     124        g_Service.pDesc->pfnStop)
     125    {
     126        ASMAtomicWriteBool(&g_Service.fShutdown, true);
     127        g_Service.pDesc->pfnStop();
     128
    131129    }
    132130
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