VirtualBox

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


Ignore:
Timestamp:
Jun 9, 2017 1:11:48 PM (7 years ago)
Author:
vboxsync
Message:

bugref:8533: Additions/x11: fully support VMSVGA
Allow VBoxClient services to daemonise without providing a pidfile.

Up until now VBoxClient service processes would be made into daemons (unless
the user overrid this) if they provided a name for creating a pidfile. We
add an additional member to the service description structure which is a
boolean specifying whether the service should be daemonised anyway. The
vmsvga service does not need a pidfile as it will use guest capability
acquiring to prevent multiple copies running, but should still be a daemon.
As the new structure member is at the end, it will automatically be zero
(false) for existing services which do not set it.

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

Legend:

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

    r67043 r67319  
    4242struct VBCLSERVICE
    4343{
    44     /** Get the services default path to pidfile, relative to $HOME */
     44    /** Get the services default path to pidfile, relative to $HOME.  Optional */
    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;
    5760};
    5861
  • trunk/src/VBox/Additions/x11/VBoxClient/main.cpp

    r67043 r67319  
    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    {
    331334        if (fDaemonise)
    332335            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