Branch: Tag:

2000-12-10

2000-12-10 02:05:33 by Per Hedbor <ph@opera.com>

Fix [Bug 869 (#869)]

Rev: server/base_server/roxen.pike:1.583

1:   // The Roxen Webserver main program.   // Copyright © 1996 - 2000, Roxen IS.   // - // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others. + // Per Hedbor, Henrik Grubbstrm, Pontus Hagland, David Hedbor and others.      // ABS and suicide systems contributed freely by Francesco Chemolli - constant cvs_version="$Id: roxen.pike,v 1.582 2000/11/27 14:09:11 per Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.583 2000/12/10 02:05:33 per Exp $";      // Used when running threaded to find out which thread is the backend thread,   // for debug purposes only.
457: Inside #if defined(THREADS)
   }   }    + #if constant(thread_create) + function async_sig_start( function f ) + { +  return lambda( mixed ... args ) { thread_create( f, @args ); }; + } + #else + function async_sig_start( function f ) + { +  // call_out is not really useful here, since we probably want to run +  // the signal handler immediately, not whenever the backend thread +  // is available. +  return f; + } + #endif +    local static Queue handle_queue = Queue();   //! Queue of things to handle.   //! An entry consists of an array(function fp, array args)
2561:      void reload_all_configurations()   { -  object conf; +  Configuration conf;    array (object) new_confs = ({});    mapping config_cache = ([]);    int modified;
2600:    }    if(err = catch    { -  conf->start(); +  conf->start( 0 );    conf->enable_all_modules();    }) {    string bt=describe_backtrace(err);
3084:       // Signals which cause a restart (exitcode != 0)    foreach( ({ "SIGINT", "SIGTERM" }), string sig) -  catch( signal(signum(sig), exit_when_done) ); +  catch( signal(signum(sig), async_sig_start(exit_when_done)) );    -  catch( signal(signum("SIGHUP"), reload_all_configurations) ); +  catch(signal(signum("SIGHUP"), async_sig_start(reload_all_configurations)));       // Signals which cause Roxen to dump the thread state    foreach( ({ "SIGUSR1", "SIGUSR2", "SIGTRAP" }), string sig) -  catch( signal(signum(sig), describe_all_threads) ); +  catch( signal(signum(sig), async_sig_start(describe_all_threads)) );      #ifdef __RUN_TRACE    trace(1);