Uploaded image for project: 'Commons Daemon'
  1. Commons Daemon
  2. DAEMON-106

prunsrv.exe //US// always returns exit code 6, even if successful

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.0.1
    • 1.0.2
    • None
    • None
    • Windows

    Description

      When using tomcat6.exe from https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/res/procrun/, the //US// command always returns 6:

      tomcat6.exe //US//servicename --Startup=auto

      returns exit code 6 even though the command successfully changed the service Startup Type to auto.

      From the source code, it looks as if docmdUpdateService just never sets the variable rv to TRUE anywhere, and the only return statements are "return FALSE" (when the code can't get a handle to the service) and return rv at the end.

      When we invoke this from our software's installer, we'd like to be able to check the exit code and trust whether it means success or failure, but as it stands we have to not check the exit code or check things other than the exit code to test for success.

      Attachments

        1. DAEMON-106_Jack.patch
          3 kB
          Jun Jie Cai

        Activity

          People

            Unassigned Unassigned
            jfk46226 Joel Klein
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: