VirtualBox

Changeset 67755 in vbox for trunk/src/VBox/Additions/x11


Ignore:
Timestamp:
Jul 3, 2017 1:33:55 PM (7 years ago)
Author:
vboxsync
Message:

bugref:8533: Additions/x11: fully support VMSVGA
Revert r116031: Allow VBoxClient services to daemonise without providing a pidfile; and r116032: Use AcquireGuestCaps in the vmsvga VBoxClient service and do not create a pidfile.

Location:
trunk/src/VBox/Additions/x11/VBoxClient
Files:
3 edited

Legend:

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

    r67319 r67755  
    4242struct VBCLSERVICE
    4343{
    44     /** Get the services default path to pidfile, relative to $HOME.  Optional */
     44    /** Get the services default path to pidfile, relative to $HOME */
    4545    /** @todo Should this also have a component relative to the X server number?
    4646     */
     
    5555     */
    5656    void (*cleanup)(struct VBCLSERVICE **ppInterface);
    57     /** Should the service daemonise?  Only checked if @a getPidFilePath is NULL. */
    58     /** @todo clean this up along with the pidfile handling. */
    59     bool fDaemonise;
    6057};
    6158
  • trunk/src/VBox/Additions/x11/VBoxClient/display-svga.cpp

    r67379 r67755  
    327327}
    328328
     329static const char *getPidFilePath()
     330{
     331    return ".vboxclient-display-svga.pid";
     332}
     333
    329334static int run(struct VBCLSERVICE **ppInterface, bool fDaemonised)
    330335{
     
    357362    if (RT_FAILURE(rc))
    358363        VBClFatalError(("Failed to request display change events, rc=%Rrc\n", rc));
    359     rc = VbglR3AcquireGuestCaps(VMMDEV_GUEST_SUPPORTS_GRAPHICS, 0, false);
    360     if (rc == VERR_RESOURCE_BUSY)  /* Someone else has already acquired it. */
    361         return VINF_SUCCESS;
     364    rc = VbglR3SetGuestCaps(VMMDEV_GUEST_SUPPORTS_GRAPHICS, 0);
    362365    if (RT_FAILURE(rc))
    363366        VBClFatalError(("Failed to register resizing support, rc=%Rrc\n", rc));
     
    414417struct VBCLSERVICE interface =
    415418{
    416     NULL,  /* No pidfile needed, as we use acquire capability for exclusion. */
     419    getPidFilePath,
    417420    VBClServiceDefaultHandler, /* Init */
    418421    run,
    419     VBClServiceDefaultCleanup,
    420     true  /* fDaemonise */
     422    VBClServiceDefaultCleanup
    421423}, *pInterface = &interface;
    422424
  • trunk/src/VBox/Additions/x11/VBoxClient/main.cpp

    r67319 r67755  
    329329        if (RT_FAILURE(rc))
    330330            VBClFatalError(("Creating PID file path failed: %Rrc\n", rc));
    331     }
    332     if ((*g_pService)->getPidFilePath || (*g_pService)->fDaemonise)
    333     {
    334331        if (fDaemonise)
    335332            rc = VbglR3Daemonize(false /* fNoChDir */, false /* fNoClose */, fRespawn, &cRespawn);
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