You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jf...@apache.org on 2001/08/31 10:33:55 UTC

cvs commit: jakarta-tomcat-service/native/winnt/moni vdmonisvc.c

jfclere     01/08/31 01:33:55

  Modified:    native/winnt/moni vdmonisvc.c
  Log:
  Allow service restart by the Service Control Manager.
  Submitted by: Dave Ringoen [dringoen@alventive.com] (for mod_jk TC3.x).
  
  Revision  Changes    Path
  1.2       +7 -2      jakarta-tomcat-service/native/winnt/moni/vdmonisvc.c
  
  Index: vdmonisvc.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-service/native/winnt/moni/vdmonisvc.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- vdmonisvc.c	2001/08/09 16:32:24	1.1
  +++ vdmonisvc.c	2001/08/31 08:33:55	1.2
  @@ -165,7 +165,12 @@
           if (GetExitCodeProcess(ProcessInformation.hProcess, &qreturn)) {
             if (qreturn == STILL_ACTIVE) continue;
             }
  -        AddToMessageLog(TEXT("ServiceStart: jsvc stopped"));
  +        AddToMessageLog(TEXT("ServiceStart: jsvc crashed"));
  +        CloseHandle(hServerStopEvent);
  +        CloseHandle(ProcessInformation.hProcess);
  +        exit(0); // exit ungracefully so
  +                 // Service Control Manager 
  +                 // will attempt a restart.
           break; //failed.
           }
   
  @@ -189,7 +194,7 @@
           CloseHandle(hServerStopEvent);
   
       if (ProcessInformation.hProcess)
  -       CloseHandle(ProcessInformation.hProcess);
  +        CloseHandle(ProcessInformation.hProcess);
   
   }