VirtualBox

Changeset 98472 in vbox for trunk/include


Ignore:
Timestamp:
Feb 3, 2023 6:56:59 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
155726
Message:

Guest Library: Introduce VbglR3DaemonizeEx and VbglR3PidfileWait, bugref:10359.

VbglR3DaemonizeEx is a wrapper function for VbglR3Daemonize. In addition to the
original version it sets pidfile lock for the parent process and notifies caller
when child process terminates with exit status VBGLR3EXITCODERELOAD (currently
equal to 2) indicating that parent process should release its reference to vboxguest
kernel module and wait for SIGUSR2 in order to restart itself. This is a part of
the procedure to install and reload/restart Guest Additions kernel modules and
user services without requiring guest reboot. It is currently only has effect
on X11 guests.

VbglR3PidfileWait is a wrapper function for VbglR3Pidfile. In addition to the
original version, it waits specified amount of time until pidfile lock become
available or fails on timeout.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxGuestLib.h

    r98103 r98472  
    554554/** @name General-purpose functions
    555555 * @{ */
     556/** Exit code which is returned by VBoxClient child process to notify
     557 * parent to release VBoxGuest driver resources on Unix-like guests. */
     558#define VBGLR3EXITCODERELOAD    (2)
     559
    556560VBGLR3DECL(int)     VbglR3Init(void);
    557561VBGLR3DECL(int)     VbglR3InitUser(void);
     
    564568VBGLR3DECL(int)     VbglR3CtlFilterMask(uint32_t fOr, uint32_t fNot);
    565569VBGLR3DECL(int)     VbglR3Daemonize(bool fNoChDir, bool fNoClose, bool fRespawn, unsigned *pcRespawn);
     570VBGLR3DECL(int)     VbglR3DaemonizeEx(bool fNoChDir, bool fNoClose, bool fRespawn, unsigned *pcRespawn,
     571                                      bool fReturnOnUpdate, bool *pfUpdateStarted, const char *szPidfile,
     572                                      RTFILE *phPidfile);
    566573VBGLR3DECL(int)     VbglR3PidFile(const char *pszPath, PRTFILE phFile);
    567574VBGLR3DECL(void)    VbglR3ClosePidFile(const char *pszPath, RTFILE hFile);
     575VBGLR3DECL(int)     VbglR3PidfileWait(const char *szPidfile, RTFILE *phPidfile, uint64_t u64TimeoutMs);
    568576VBGLR3DECL(int)     VbglR3SetGuestCaps(uint32_t fOr, uint32_t fNot);
    569577VBGLR3DECL(int)     VbglR3AcquireGuestCaps(uint32_t fOr, uint32_t fNot, bool fConfig);
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