BOOL docmdRunService(LPAPXCMDLINE lpCmdline) has strange check for 
StartServiceCtrlDispatcherW return
-----------------------------------------------------------------------------------------------------

                 Key: DAEMON-155
                 URL: https://issues.apache.org/jira/browse/DAEMON-155
             Project: Commons Daemon
          Issue Type: Bug
          Components: Procrun
            Reporter: Sebb
            Priority: Minor


docmdRunService calls docmdRunService as follows:

{code}
rv = (StartServiceCtrlDispatcherW(_service_table) == FALSE);
{code}

However, the documentation for StartServiceCtrlDispatcherW states that it 
returns 0 (i.e. FALSE here) only if it fails.

Thus rv is set FALSE iff the call fails. That's surely the wrong way round? It 
would explain why the log says 
"[error] Commons Daemon procrun failed with exit value: 4"

I think the code should read

{code}
rv = (StartServiceCtrlDispatcherW(_service_table) != 0);
{code}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to