VirtualBox

Ignore:
Timestamp:
Jan 28, 2015 3:46:18 PM (10 years ago)
Author:
vboxsync
Message:

Additions/x11/VBoxClient: reduce message spam when we respawn.

File:
1 edited

Legend:

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

    r54010 r54019  
    6060 */
    6161RTCRITSECT g_critSect;
     62/** Counter of how often our deamon has been respawned. */
     63unsigned cRespawn = 0;
    6264
    6365/** Exit with a fatal error. */
     
    6567{
    6668    char *pszCommand;
    67     if (pszMessage)
    68     {
    69         pszCommand = RTStrAPrintf2("notify-send \"VBoxClient: %s\"",
     69    if (pszMessage && cRespawn == 0)
     70    {
     71        pszCommand = RTStrAPrintf2("notify-send -t 5 \"VBoxClient: %s\"",
    7072                                   pszMessage);
    7173        if (pszCommand)
     
    371373        VBClFatalError(("Creating pid-file path: %Rrc\n", rc));
    372374    if (fDaemonise)
    373         rc = VbglR3Daemonize(false /* fNoChDir */, false /* fNoClose */, fRespawn, NULL);
     375        rc = VbglR3Daemonize(false /* fNoChDir */, false /* fNoClose */, fRespawn, &cRespawn);
    374376    if (RT_FAILURE(rc))
    375377        VBClFatalError(("Daemonizing: %Rrc\n", rc));
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