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 - 2004, 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.879 2004/08/19 15:16:13 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.880 2004/08/25 08:48:18 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:4755:    catch(signal(signum("SIGHUP"),async_sig_start(reload_all_configurations,1)));       // Signals which cause Roxen to dump the thread state    foreach( ({ "SIGBREAK", "SIGQUIT" }), string sig)    catch( signal(signum(sig),async_sig_start(describe_all_threads,-1)));       start_time=time(); // Used by the "uptime" info later on.       restart_suicide_checker();    + #ifdef ROXEN_DEBUG_MEMORY_TRACE +  restart_roxen_debug_memory_trace(); + #endif +    #ifndef __NT__    restart_if_stuck( 0 );   #endif   #ifdef __RUN_TRACE    trace(1);   #endif    return -1;   }      void check_commit_suicide()
Roxen.git/server/base_server/roxen.pike:4821:   }      void restart_suicide_checker()   {    remove_call_out(check_commit_suicide);    remove_call_out(check_suicide);    call_out(check_suicide, 60);    call_out(check_commit_suicide, 180); // Minimum uptime: 3 minutes.   }    + #ifdef ROXEN_DEBUG_MEMORY_TRACE + static object roxen_debug_info_obj; + void restart_roxen_debug_memory_trace() + { +  remove_call_out(restart_roxen_debug_memory_trace); +  +  if (!roxen_debug_info_obj) { +  roxen_debug_info_obj = ((program)"config_interface/actions/debug_info.pike")(); +  } +  int t = time(0); +  string html = roxen_debug_info_obj->parse((["real_variables":([])])); +  if (!Stdio.is_dir("../var/debug")) { +  mkdir("../var/debug"); +  } +  Stdio.write_file(sprintf("../var/debug/memory_info_%d.rxml", t), html); +  call_out(restart_roxen_debug_memory_trace, 5); + } + #endif +    // Called from the administration interface.   string check_variable(string name, mixed value)   {    switch(name)    {   #ifndef __NT__    case "abs_engage":    if (value)    // Make sure restart_if_stuck is called from the backend thread.    call_out(restart_if_stuck, 0, 1);