VirtualBox

Changeset 67320 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Jun 9, 2017 1:18:12 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
116032
Message:

bugref:8533: Additions/x11: fully support VMSVGA
Use AcquireGuestCaps in the vmsvga VBoxClient service and do not create a pidfile.

This change makes the VBoxClient vmsvga service use the new AcquireGuestCaps
function in the R3 guest library, and stop creating a pidfile, but still
daemonise. The pidfile is no longer needed to prevent multiple copies of
the service from running due to the use of AcquireGuestCaps, and was not very
clean either, as the service running as root created it in the root home. If
we do decide to go back to creating pidfiles this needs to be fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/display-svga.cpp

    r67263 r67320  
    321321}
    322322
    323 static const char *getPidFilePath()
    324 {
    325     return ".vboxclient-display-svga.pid";
    326 }
    327 
    328323static int run(struct VBCLSERVICE **ppInterface, bool fDaemonised)
    329324{
     
    356351    if (RT_FAILURE(rc))
    357352        VBClFatalError(("Failed to request display change events, rc=%Rrc\n", rc));
    358     rc = VbglR3SetGuestCaps(VMMDEV_GUEST_SUPPORTS_GRAPHICS, 0);
     353    rc = VbglR3AcquireGuestCaps(VMMDEV_GUEST_SUPPORTS_GRAPHICS, 0, false);
     354    if (rc == VERR_RESOURCE_BUSY)  /* Someone else has already acquired it. */
     355        return VINF_SUCCESS;
    359356    if (RT_FAILURE(rc))
    360357        VBClFatalError(("Failed to register resizing support, rc=%Rrc\n", rc));
     
    411408struct VBCLSERVICE interface =
    412409{
    413     getPidFilePath,
     410    NULL,  /* No pidfile needed, as we use acquire capability for exclusion. */
    414411    VBClServiceDefaultHandler, /* Init */
    415412    run,
    416     VBClServiceDefaultCleanup
     413    VBClServiceDefaultCleanup,
     414    true  /* fDaemonise */
    417415}, *pInterface = &interface;
    418416
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