Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2001, Roxen IS.   //   // The Roxen WebServer main program.   //   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // ABS and suicide systems contributed freely by Francesco Chemolli    - constant cvs_version="$Id: roxen.pike,v 1.871 2004/05/04 10:59:03 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.872 2004/05/04 15:02:35 grubba Exp $";      //! @appears roxen   //!   //! The Roxen WebServer main program.      // The argument cache. Used by the image cache.   ArgCache argcache;      // Some headerfiles   #define IN_ROXEN
Roxen.git/server/base_server/roxen.pike:95:   {    if( objectp( o ) )    o = object_program( o );       string fname = master()->program_name( o );    if( !fname )    fname = "Unknown Program";    return fname-(getcwd()+"/");   }    + static int once_mode; +    // Note that 2.5 is a nonexisting version. It's only used for the   // cache static optimization for tags such as <if> and <emit> inside   // <cache> since that optimization can give tricky incompatibilities   // with 2.4.   array(string) compat_levels = ({"2.1", "2.2", "2.4", "2.5", "3.3", "3.4", "4.0"});      #ifdef THREADS   mapping(string:string) thread_names = ([]);   string thread_name( object thread )   {
Roxen.git/server/base_server/roxen.pike:426:    configurations->stop(1);   }      // Function that actually shuts down Roxen. (see low_shutdown).   private void really_low_shutdown(int exit_code)   {    // Die nicely. Catch for paranoia reasons   #ifdef THREADS    catch (stop_handler_threads());   #endif /* THREADS */ -  if (!exit_code) { +  if (!exit_code || once_mode) {    // We're shutting down; Attempt to take mysqld with us.    catch { report_notice("Shutting down MySQL.\n"); };    catch {    Sql.sql db = connect_to_my_mysql(0, "mysql");    db->shutdown();    };    }    destruct (cache);    catch { - #if 0 -  if (exit_code) +  if (exit_code && !once_mode)    report_notice("Restarting Roxen.\n");    else    report_notice("Shutting down Roxen.\n"); - #else -  report_notice("Restarting or shutting down Roxen.\n"); - #endif +     };    roxenloader.real_exit( exit_code ); // Now we die...   }      private int _recurse;      // Shutdown Roxen   // exit_code = 0 True shutdown   // exit_code = -1 Restart   private void low_shutdown(int exit_code)
Roxen.git/server/base_server/roxen.pike:4504:    DDUMP( "base_server/highlight_pike.pike" );    DDUMP( "base_server/wizard.pike" );    DDUMP( "base_server/proxyauth.pike" );    DDUMP( "base_server/module.pike" );    DDUMP( "base_server/throttler.pike" );       mark_fd(0, "Stdin");    mark_fd(1, "Stdout");    mark_fd(2, "Stderr");    +  once_mode = (int)Getopt.find_option(argv, "o", "once"); +     configuration_dir =    Getopt.find_option(argv, "d",({"config-dir","configuration-directory" }),    ({ "ROXEN_CONFIGDIR", "CONFIGURATIONS" }), "../configurations");       if(configuration_dir[-1] != '/')    configuration_dir += "/";       restore_global_variables(); // restore settings...       if( query("replicate" ) )