Branch: Tag:

1996-12-10

1996-12-10 00:15:44 by Per Hedbor <ph@opera.com>

ny version

Rev: server/base_server/configuration.pike:1.10
Rev: server/base_server/mainconfig.pike:1.27
Rev: server/base_server/roxen.pike:1.22
Rev: server/modules/graphics/graphic_text.pike:1.7
Rev: server/modules/proxies/ftpgateway.pike:1.8
Rev: server/roxen-images/background.gif:1.4

1: - string cvs_version = "$Id: roxen.pike,v 1.21 1996/12/08 10:33:24 neotron Exp $"; + string cvs_version = "$Id: roxen.pike,v 1.22 1996/12/10 00:15:41 per Exp $";   #define IN_ROXEN   #include <module.h>   #include <variables.h>
1466: Inside #if defined(MODULE_LEVEL_SECURITY)
   }   }    + void stop_all_modules() + { +  foreach(configurations, object conf) +  conf->stop(); + } +  +    // Perhaps somewhat misnamed, really... This function will close all   // listen ports, fork a new copy to handle the last connections, and   // then quit the original process. The 'start' script should then
1473: Inside #if defined(MODULE_LEVEL_SECURITY)
     mapping restart()   { +  stop_all_modules();    call_out(fork_or_quit, 1);    return ([ "data":read_bytes("etc/restart.html"), "type":"text/html" ]);   }
1487: Inside #if defined(MODULE_LEVEL_SECURITY)
     mapping shutdown()   { +  catch(map_array(indices(portno)), destruct); +     object privs = ((program)"privs")("Shutting down the server");    // Change to root user. -  catch(map_array(indices(portno)), destruct); +     -  +  stop_all_modules();       if(main_configuration_port && objectp(main_configuration_port))    {
3114:   {    object o;    int i; +  perror("Interrupt request received. Exiting,\n");    if(++_recurse > 4) -  +  { +  werror("Exiting roxen (spurious signals received).\n"); +  stop_all_modules();    exit(0); -  +  }    if(main_configuration_port && objectp(main_configuration_port))    {    int pid;
3137: Inside #if efun(_pipe_debug)
  #if efun(_pipe_debug)    call_out(lambda() {    call_out(this_function(), 5); -  if(!_pipe_debug()[0]) exit(0); -  }, 0); +  if(!_pipe_debug()[0]) +  { +  werror("Exiting roxen (all connections closed).\n"); +  stop_all_modules(); +  exit(0); +  } +  }, 0.1);   #endif -  call_out(exit, 600, 0); // Slow buggers.. +  call_out(lambda(){ +  werror("Exiting roxen (timeout).\n"); +  stop_all_modules(); +  exit(0); +  }, 600, 0); // Slow buggers..   }      void exit_it()