VirtualBox

Changeset 32567 in vbox


Ignore:
Timestamp:
Sep 16, 2010 2:47:42 PM (14 years ago)
Author:
vboxsync
Message:

vboxwebsrv: introduced --pidfile parameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/webservice/vboxweb.cpp

    r32388 r32567  
    162162        { "--keepalive",        'k', RTGETOPT_REQ_UINT32 },
    163163        { "--verbose",          'v', RTGETOPT_REQ_NOTHING },
     164        { "--pidfile",          'P', RTGETOPT_REQ_STRING },
    164165        { "--logfile",          'F', RTGETOPT_REQ_STRING },
    165166    };
     
    217218            case 'v':
    218219                pcszDescr = "Be verbose.";
     220                break;
     221
     222            case 'P':
     223                pcszDescr = "Name of the PID file which is created when the daemon was started.";
    219224                break;
    220225
     
    634639
    635640    int c;
     641    const char *pszPidFile = NULL;
    636642    RTGETOPTUNION ValueUnion;
    637643    RTGETOPTSTATE GetState;
     
    668674            }
    669675
     676            case 'P':
     677                pszPidFile = ValueUnion.psz;
     678                break;
     679
    670680            case 'T':
    671681                g_cMaxWorkerThreads = ValueUnion.u32;
     
    702712    if (g_fDaemonize)
    703713    {
    704         rc = RTProcDaemonizeUsingFork(false /* fNoChDir */, false /* fNoClose */, NULL);
     714        rc = RTProcDaemonizeUsingFork(false /* fNoChDir */, false /* fNoClose */, pszPidFile);
    705715        if (RT_FAILURE(rc))
    706716            return RTMsgErrorExit(RTEXITCODE_FAILURE, "failed to daemonize, rc=%Rrc. exiting.", 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