Revision baa4c9bf
Added by Hamish Coleman about 14 years ago
- ID baa4c9bfa273f69be5e5be8fed5f2fd845330d97
win-scm.c | ||
---|---|---|
svcStatus.dwCurrentState = SERVICE_START_PENDING;
|
||
SetServiceStatus( svcHandle, &svcStatus );
|
||
|
||
/*
|
||
* If there is only one SCM arg, it is just the servicename, so use
|
||
* the original cmdline instead.
|
||
* Otherwise, let the SCM args completely override the original ones
|
||
*/
|
||
if (argc==1) {
|
||
argc=sd->argc;
|
||
argv=sd->argv;
|
||
}
|
||
|
||
sd->mode=SVC_OK;
|
||
/* TODO - use either saved cmdline args or scm args here */
|
||
if ((err=sd->init(argc,argv))!=0) {
|
||
svcStatus.dwCurrentState = SERVICE_STOPPED;
|
||
svcStatus.dwWin32ExitCode = err;
|
Also available in: Unified diff
Use the SCM args if they are provided, otherwise just use the cmdline ones