You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2002/03/14 05:37:14 UTC

cvs commit: httpd-2.0/server/mpm/winnt service.c

wrowe       02/03/13 20:37:14

  Modified:    server/mpm/winnt service.c
  Log:
    Use fprintf to stderr over printf.  Better yet - replace with the
    logger, but my brain just isn't quite there tonight.
  
  Revision  Changes    Path
  1.47      +13 -13    httpd-2.0/server/mpm/winnt/service.c
  
  Index: service.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/service.c,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- service.c	14 Mar 2002 04:34:03 -0000	1.46
  +++ service.c	14 Mar 2002 04:37:14 -0000	1.47
  @@ -784,7 +784,7 @@
       char *launch_cmd;
       apr_status_t(rv);
       
  -    printf("Installing the %s service\n", mpm_display_name);
  +    fprintf(stderr,"Installing the %s service\n", mpm_display_name);
   
       if (GetModuleFileName(NULL, exe_path, sizeof(exe_path)) == 0)
       {
  @@ -884,7 +884,7 @@
                        mpm_display_name);
           return (rv);
       }
  -    printf("The %s service is successfully installed.\n", mpm_display_name);
  +    fprintf(stderr,"The %s service is successfully installed.\n", mpm_display_name);
       return APR_SUCCESS;
   }
   
  @@ -899,7 +899,7 @@
           SC_HANDLE schService;
           SC_HANDLE schSCManager;
   
  -        printf("Removing the %s service\n", mpm_display_name);
  +        fprintf(stderr,"Removing the %s service\n", mpm_display_name);
   
           // TODO: Determine the minimum permissions required for security
           schSCManager = OpenSCManager(NULL, NULL, /* local, default database */
  @@ -942,7 +942,7 @@
       }
       else /* osver.dwPlatformId != VER_PLATFORM_WIN32_NT */
       {
  -        printf("Removing the %s service\n", mpm_display_name);
  +        fprintf(stderr,"Removing the %s service\n", mpm_display_name);
   
           /* TODO: assure the service is stopped before continuing */
   
  @@ -965,7 +965,7 @@
               return (rv);
           }
       }
  -    printf("The %s service has been removed successfully.\n", mpm_display_name);
  +    fprintf(stderr,"The %s service has been removed successfully.\n", mpm_display_name);
       return APR_SUCCESS;
   }
   
  @@ -997,7 +997,7 @@
   {
       apr_status_t rv;
       
  -    printf("Starting the %s service\n", mpm_display_name);
  +    fprintf(stderr,"Starting the %s service\n", mpm_display_name);
   
       if (osver.dwPlatformId == VER_PLATFORM_WIN32_NT)
       {
  @@ -1125,7 +1125,7 @@
       }    
   
       if (rv == APR_SUCCESS)
  -        printf("The %s service is running.\n", mpm_display_name);
  +        fprintf(stderr,"The %s service is running.\n", mpm_display_name);
       else
           ap_log_error(APLOG_MARK, APLOG_CRIT, rv, NULL,
                        "%s: Failed to start the service process.",
  @@ -1175,13 +1175,13 @@
           }
   
           if (!signal && (globdat.ssStatus.dwCurrentState == SERVICE_STOPPED)) {
  -            printf("The %s service is not started.\n", mpm_display_name);
  +            fprintf(stderr,"The %s service is not started.\n", mpm_display_name);
               CloseServiceHandle(schService);
               CloseServiceHandle(schSCManager);
               return;
           }
           
  -        printf("The %s service is %s.\n", mpm_display_name, 
  +        fprintf(stderr,"The %s service is %s.\n", mpm_display_name, 
                  signal ? "restarting" : "stopping");
   
           if (!signal)
  @@ -1219,12 +1219,12 @@
           {
               globdat.ssStatus.dwCurrentState = SERVICE_STOPPED;
               if (!signal) {
  -                printf("The %s service is not started.\n", mpm_display_name);
  +                fprintf(stderr,"The %s service is not started.\n", mpm_display_name);
                   return;
               }
           }
   
  -        printf("The %s service is %s.\n", mpm_display_name, 
  +        fprintf(stderr,"The %s service is %s.\n", mpm_display_name, 
                  signal ? "restarting" : "stopping");
   
           apr_snprintf(prefix, sizeof(prefix), "ap%ld", (long)service_pid);
  @@ -1262,9 +1262,9 @@
       }
   
       if (success)
  -        printf("The %s service has %s.\n", mpm_display_name, 
  +        fprintf(stderr,"The %s service has %s.\n", mpm_display_name, 
                  signal ? "restarted" : "stopped");
       else
  -        printf("Failed to %s the %s service.\n", 
  +        fprintf(stderr,"Failed to %s the %s service.\n", 
                  signal ? "restart" : "stop", mpm_display_name);
   }