Branch: Tag:

1997-03-02

1997-03-02 19:28:43 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Updated to Pike 0.5b2.

Rev: server/base_server/cache.pike:1.8.2.1
Rev: server/base_server/color.pike:1.2.2.1
Rev: server/base_server/config/builders.pike:1.1.1.1.2.1
Rev: server/base_server/config/describers.pike:1.16.2.2
Rev: server/base_server/config/draw_things.pike:1.16.2.1
Rev: server/base_server/config/low_describers.pike:1.3.2.1
Rev: server/base_server/db.pike:1.2.2.1
Rev: server/base_server/disk_cache.pike:1.12.2.1
Rev: server/base_server/hosts.pike:1.8.2.1
Rev: server/base_server/language.pike:1.6.2.1
Rev: server/base_server/mainconfig.pike:1.29.2.1
Rev: server/base_server/module_support.pike:1.7.2.1
Rev: server/base_server/newdecode.pike:1.3.2.1
Rev: server/base_server/persistent.pike:1.3.2.1
Rev: server/base_server/read_config.pike:1.6.2.1
Rev: server/base_server/roxen.pike:1.31.2.3
Rev: server/base_server/socket.pike:1.3.2.1
Rev: server/bin/install.pike:1.8.2.1
Rev: server/etc/include/roxen.pre.pike:1.5.2.1
Rev: server/modules/directories/directories.pike:1.7.2.1
Rev: server/modules/directories/directories2.pike:1.1.2.4
Rev: server/modules/directories/fastdir.pike:1.5.2.1
Rev: server/modules/filesystems/filesystem.pike:1.7.2.1
Rev: server/modules/filesystems/userfs.pike:1.8.2.2
Rev: server/modules/filters/htaccess.pike:1.7.2.1
Rev: server/modules/filters/redirect.pike:1.4.2.1
Rev: server/modules/graphics/tablist.pike:1.2.2.1
Rev: server/modules/logging/home_logger.pike:1.6.2.1
Rev: server/modules/misc/contenttypes.pike:1.5.2.1
Rev: server/modules/misc/ismap.pike:1.5.2.1
Rev: server/modules/misc/userdb.pike:1.8.2.1
Rev: server/modules/scripting/cgi.pike:1.9.2.2
Rev: server/modules/scripting/fcgi.pike:1.6.2.1
Rev: server/modules/scripting/pikescript.pike:1.6.2.2
Rev: server/modules/tags/htmlparse.pike:1.19.2.3

1: - string cvs_version = "$Id: roxen.pike,v 1.31.2.2 1997/03/01 17:27:27 grubba Exp $"; + string cvs_version = "$Id: roxen.pike,v 1.31.2.3 1997/03/02 19:11:56 grubba Exp $"; +    #define IN_ROXEN   #include <module.h>   #include <variables.h>
14:   inherit "disk_cache";   inherit "language";    + import Stdio; + import Array; + import String; +    int num_connections;      object roxen=this_object();
140: Inside #if efun(_pipe_debug)
   exit(0);   #if efun(_pipe_debug)    call_out(lambda() { // Wait for all connections to finish -  call_out(this_function(), 20); +  call_out(Simulate.this_function(), 20);    if(!_pipe_debug()[0]) exit(0);    }, 1);   #endif
257:       if(!port_no)    { -  port = Port ( "stdin", accept_callback ); +  port = files.port ( "stdin", accept_callback );       if(port->errno())    {
265:    "Errno is "+port->errno()+"\n");    }    } else { -  port = Port (); +  port = files.port ();    if(!stringp(ether) || (lower_case(ether) == "any"))    ether=0;    if(ether)
932:    string ext=extension(file);       if(!current_configuration) -  current_configuration = find_configuration_for(previous_object()); +  current_configuration = find_configuration_for(Simulate.previous_object());    if(!current_configuration->types_fun)    return to?({ "application/octet-stream", 0 }):"application/octet-stream";   
1498: Inside #if defined(MODULE_LEVEL_SECURITY)
     mapping shutdown()   { -  catch(map_array(indices(portno)), destruct); +  catch(map(indices(portno)), destruct);       object privs = ((program)"privs")("Shutting down the server");    // Change to root user.
1509: Inside #if defined(MODULE_LEVEL_SECURITY)
   {    // Only _really_ do something in the main process.    int pid; -  catch(map_array(configuration_ports, destruct)); +  catch(map(configuration_ports, destruct));       if(search(subs, getpid()) == -1)    {    perror("Shutting down Roxen.\n"); -  catch(map_array(subs, kill, signum("SIGUSR1"))); -  catch(map_array(subs, kill, signum("SIGKILL"))); +  catch(map(subs, kill, signum("SIGUSR1"))); +  catch(map(subs, kill, signum("SIGKILL")));       // Fallback for systems without geteuid, Roxen will (probably)    // not be able to kill the start-script if this is the case.
1699: Inside #if defined(MODULE_LEVEL_SECURITY)
      init_log_file(current_configuration);    -  map_array(indices(current_configuration->open_ports), do_dest); +  map(indices(current_configuration->open_ports), do_dest);       catch {    foreach(query("Ports"), port )
1734: Inside #if defined(MODULE_LEVEL_SECURITY)
   "Tried:\n"    "Port Protocol IP-Number \n"    "---------------------------\n" -  + map_array(query("Ports"), lambda(array p) { +  + map(query("Ports"), lambda(array p) {    return sprintf("%5d %-10s %-20s\n", @p);    })*"");    }
1744: Inside #if defined(MODULE_LEVEL_SECURITY)
     void create()   { -  add_efun("roxen", this_object()); -  add_efun("spinner", this_object()); -  add_efun("load", load); +  add_constant("roxen", this_object()); +  add_constant("spinner", this_object()); +  add_constant("load", load);    (object)"color";   }   
2791:    object o;    array port;    -  if(catch(map_array(configuration_ports, destruct))) -  catch(map_array(configuration_ports, do_dest)); +  if(catch(map(configuration_ports, destruct))) +  catch(map(configuration_ports, do_dest));       catch(do_dest(main_configuration_port));   
3168: Inside #if efun(_pipe_debug)
   // Then wait for all sockets, but maximum 10 minutes..   #if efun(_pipe_debug)    call_out(lambda() { -  call_out(this_function(), 5); +  call_out(Simulate.this_function(), 5);    if(!_pipe_debug()[0])    {    werror("Exiting roxen (all connections closed).\n");
3194:      array do_fork_it()   { -  catch(map_array(configuration_ports, destruct)); +  catch(map(configuration_ports, destruct));    if(objectp(main_configuration_port))    destruct(main_configuration_port);    main_configuration_port = 0;
3272:    destruct(stdout);    destruct(stdin);    -  add_efun("write", perror); +  add_constant("write", perror);          mark_fd(0, "Stdin");
3393:    "<table width=100% cellspacing=0 cellpadding=0>\n"+    "<tr align=right><td>fd</td><td>type</td><td>mode</td>"+    "<td>size</td></tr>\n"+ -  (map_array(get_all_active_fd(), +  (map(get_all_active_fd(),    lambda(int fd)    {    return ("<tr align=right><th>"+fd+"</th><td>"+