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.808 2003/05/05 16:46:50 mast Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.809 2004/05/07 14:42:43 mast Exp $";      // The argument cache. Used by the image cache.   ArgCache argcache;      // Some headerfiles   #define IN_ROXEN   #include <roxen.h>   #include <config.h>   #include <module.h>   #include <variables.h>
Roxen.git/server/base_server/roxen.pike:586: Inside #if defined(THREADS) and #if defined(TEST_EUID_CHANGE)
   if (test_euid_change) {    Stdio.File f = Stdio.File();    if (f->open ("rootonly", "r") && f->read())    werror ("Handler thread %d can read rootonly\n", id);    else    werror ("Handler thread %d can't read rootonly\n", id);    }   #endif    while(1)    { +  int thread_flagged_as_busy;    if(q=catch {    do {   // if (!busy_threads) werror ("GC: %d\n", gc());    THREAD_WERR("Handle thread ["+id+"] waiting for next event");    if(arrayp(h=handle_queue->read()) && h[0]) {    THREAD_WERR(sprintf("Handle thread [%O] calling %O(%{%O, %})",    id, h[0], h[1] / 1));    set_locale();    busy_threads++; -  +  thread_flagged_as_busy = 1;    h[0](@h[1]);    h=0;    busy_threads--; -  +  thread_flagged_as_busy = 0;    } else if(!h) {    // Roxen is shutting down.    report_debug("Handle thread ["+id+"] stopped.\n");    thread_reap_cnt--;   #ifdef NSERIOUS    if(!thread_reap_cnt) report_debug("+++ATH\n");   #endif    return;    }   #ifdef DEBUG
Roxen.git/server/base_server/roxen.pike:621: Inside #if defined(THREADS)
   else {    num_hold_messages--;    THREAD_WERR("Handle thread [" + id + "] put on hold");    threads_on_hold++;    if (Thread.Condition cond = hold_wakeup_cond) cond->wait();    threads_on_hold--;    THREAD_WERR("Handle thread [" + id + "] released");    }    } while(1);    }) { +  if (thread_flagged_as_busy) +  busy_threads--;    if (h = catch {    report_error(/*LOCALE("", "Uncaught error in handler thread: %s"    "Client will not get any response from Roxen.\n"),*/    describe_backtrace(q));    if (q = catch {h = 0;}) {    report_error(LOC_M(5, "Uncaught error in handler thread: %sClient "    "will not get any response from Roxen.")+"\n",    describe_backtrace(q));    catch (q = 0);    }