VirtualBox

Ignore:
Timestamp:
Jul 3, 2007 11:42:41 AM (17 years ago)
Author:
vboxsync
Message:

Main: Properly daemonize VBoxSVC.exe on OS/2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/linux/server_module.cpp

    r2981 r3388  
    2020 */
    2121
     22#ifdef __OS2__
     23# include <prproces.h>
     24#endif
     25
    2226#include <nsMemory.h>
    2327#include <nsString.h>
     
    165169                startedOnce = true;
    166170
     171#ifdef __OS2__
     172                char *const args[] = { VBoxSVCPath, "--automate", 0 };
     173                /* use NSPR because we want the process to be detached right
     174                 * at startup (it isn't possible to detach it later on) */
     175                PRStatus rv = PR_CreateProcessDetached (VBoxSVCPath,
     176                                                        args, NULL, 0);
     177                if (rv != PR_SUCCESS)
     178                {
     179                    rc = NS_ERROR_FAILURE;
     180                    break;
     181                }
     182#else
     183                const char *args[] = { VBoxSVCPath, "--automate", 0 };
    167184                RTPROCESS pid = NIL_RTPROCESS;
    168                 const char *args[] = { VBoxSVCPath, "--automate", 0 };
    169185                vrc = RTProcCreate (VBoxSVCPath, args, NULL, 0, &pid);
    170186                if (VBOX_FAILURE (vrc))
     
    173189                    break;
    174190                }
     191#endif
    175192
    176193                /* wait for the server process to establish a connection */
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