VirtualBox

Changeset 15023 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Dec 5, 2008 9:15:22 AM (16 years ago)
Author:
vboxsync
Message:

Fe/Qt4: Systray: Daemonize processes for Linux/Mac/Solaris using RTProcCreate w/ new flag.

Location:
trunk/src/VBox/Frontends/VirtualBox4/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp

    r14977 r15023  
    14591459    const char * args[] = {path, 0 };
    14601460# endif
    1461     rc = RTProcCreate (path, args, env, 0, &pid);
     1461    rc = RTProcCreate (path, args, env, RTPROC_FLAGS_DAEMONIZE, &pid);
    14621462    if (RT_FAILURE (rc))
    14631463        LogRel(("Systray: Failed to start new selector window! Path=%s, rc=%Rrc\n", path, rc));
     
    15101510        const char * args[] = {path, "-systray", 0 };
    15111511    # endif
    1512         rc = RTProcCreate (path, args, env, 0, &pid);
     1512        rc = RTProcCreate (path, args, env, RTPROC_FLAGS_DAEMONIZE, &pid);
    15131513        if (RT_FAILURE (rc))
    15141514        {
  • trunk/src/VBox/Frontends/VirtualBox4/src/main.cpp

    r14924 r15023  
    427427int main (int argc, char **argv, char **envp)
    428428{
    429 #if 0
    430     /* 1. Does (at least currently) not work with -startvm.
    431      * 2. Probably not a good idea with -startvm because we don't see any further
    432      *    messages on the console */
    433 #if defined(VBOX_GUI_WITH_SYSTRAY) && \
    434     (defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined (RT_OS_SOLARIS) || defined(RT_OS_FREEBSD))
    435     int rc = RTProcDaemonize(false /* fNoChDir */, false /* fNoClose */, NULL);
    436     if (RT_FAILURE(rc))
    437     {
    438         RTStrmPrintf(g_pStdErr, "VirtualBox: Failed to daemonize, rc=%Rrc. Exiting.\n", rc);
    439         exit(1);
    440     }
    441 #endif
    442 #endif
    443 
    444429    /* Initialize VBox Runtime. Initialize the SUPLib as well only if we
    445430     * are really about to start a VM. Don't do this if we are only starting
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