Changeset 20184


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).

Location:
gsdl/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/gsicontrol.bat

    r20159 r20184  
    178178    echo Stopping web server (if running)
    179179    if not exist "%GSDLHOME%\apache-httpd\%GSDLOS%\conf\httpd.conf" echo missing conf file
    180     if exist "%GSDLHOME%\apache-httpd\%GSDLOS%\conf\httpd.conf" "%GSDLHOME%\bin\windows\stophttpd.exe" GS2_APACHE_HTTPD
     180    if exist "%GSDLHOME%\apache-httpd\%GSDLOS%\conf\httpd.conf" "%GSDLHOME%\bin\windows\stophttpd.exe" GS2_APACHE_HTTPD SILENT
    181181    echo Setting config file to use port %port%
    182182bin\windows\sed.exe "s@\*\*GSDLHOME\*\*@\"%safepath%\"@g" cgi-bin/gsdlsite.cfg.in > cgi-bin/gsdlsite.cfg
  • 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.