Ignore:
Timestamp:
2009-08-07T21:04:08+12:00 (15 years ago)
Author:
ak19
Message:

The program that sends the Stop signal to the apache web server now takes an additional parameter: SILENT. If provided, it will not display a popup if the handle is invalid (if there was no apache web server running).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/runtime-src/src/w32apachectl/stophttpd.cpp

    r19345 r20184  
    5959                                 LPTSTR pszCmdLine, int nShowCmd)
    6060{
    61   if(__argc != 2) {
    62     MessageBox(NULL, __TEXT("Usage: stophttpd.exe <event-name>"),
     61  if(__argc < 2 ||__argc > 3) {
     62    MessageBox(NULL, __TEXT("Usage: stophttpd.exe <event-name> [SILENT]"),
    6363           TEXT("Error"), MB_OK);
    6464    return(1);
     
    7171  // send the termination event
    7272  if (SetEvent(g_heventTerminateProcessGroup)==0) {
    73     // do error popup ExitError
    74    
    75     ErrorExit(TEXT("Failed to send termination event: httpd.exe needs to be terminated manually."));
    76     fprintf(stderr, "Failed to send termination event: httpd.exe needs to be terminated manually.\n");
     73    // no popup if in SILENT mode (3rd arg == silent or SILENT)
     74    if(__argc != 3 || _stricmp(__argv[2], "SILENT\0") != 0) {
     75      // do error popup ExitError
     76     
     77      ErrorExit(TEXT("Failed to send termination event: httpd.exe needs to be terminated manually."));
     78      fprintf(stderr, "Failed to send termination event: httpd.exe needs to be terminated manually.\n");
     79    }
    7780  }
    7881 
Note: See TracChangeset for help on using the changeset viewer.