VirtualBox

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


Ignore:
Timestamp:
Oct 6, 2016 2:44:38 PM (8 years ago)
Author:
vboxsync
Message:

bugref:7535: Additions: desktop notification feature for critical errors: when VBoxClient exits with a fatal error and notify-send is not available to notify the user, try xmessage then fall back to printing to the console.

File:
1 edited

Legend:

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

    r62883 r64167  
    6969{
    7070    char *pszCommand;
     71    int status;
    7172    if (pszMessage && cRespawn == 0)
    7273    {
     
    7475        if (pszCommand)
    7576        {
    76             int rcShutUpGcc = system(pszCommand); RT_NOREF_PV(rcShutUpGcc);
     77            status = system(pszCommand);
     78            if (WEXITSTATUS(status) != 0)  /* Utility or extension not available. */
     79            {
     80                pszCommand = RTStrAPrintf2("xmessage -buttons OK:0 -center \"VBoxClient: %s\"",
     81                                           pszMessage);
     82                if (pszCommand)
     83                {
     84                    status = system(pszCommand);
     85                    if (WEXITSTATUS(status) != 0)  /* Utility or extension not available. */
     86                    {
     87                        RTPrintf("VBoxClient: %s", pszMessage);
     88                    }
     89                }
     90            }
    7791        }
    7892    }
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