VirtualBox

Changeset 29936 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Jun 1, 2010 8:30:15 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
62205
Message:

Block first for a minute as using DONT_RESOLVE_DLL_REFERENCES is kind of risky.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp

    r29640 r29936  
    397397    RTThreadUserSignal(RTThreadSelf());
    398398
     399        /*
     400         * Block here first for a minute as using DONT_RESOLVE_DLL_REFERENCES is kind of risky; other code that uses LoadLibrary on a dll loaded like this
     401         * before will end up crashing the process as the dll's init routine was never called.
     402         *
     403         * We have to use this feature as we can't simply execute all init code in our service process.
     404         *
     405         */
     406    int rc = RTSemEventMultiWait(g_PageSharingEvent, 60000);
     407    if (*pfShutdown)
     408        goto end;
     409
     410    if (rc != VERR_TIMEOUT && RT_FAILURE(rc))
     411    {
     412        VBoxServiceError("RTSemEventMultiWait failed; rc=%Rrc\n", rc);
     413        goto end;
     414    }
     415
    399416    /*
    400417     * Now enter the loop retrieving runtime data continuously.
     
    415432        if (*pfShutdown)
    416433            break;
    417         int rc = RTSemEventMultiWait(g_PageSharingEvent, 60000);
     434        rc = RTSemEventMultiWait(g_PageSharingEvent, 60000);
    418435        if (*pfShutdown)
    419436            break;
     
    425442    }
    426443
     444end:
    427445    RTSemEventMultiDestroy(g_PageSharingEvent);
    428446    g_PageSharingEvent = NIL_RTSEMEVENTMULTI;
Note: See TracChangeset for help on using the changeset viewer.

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