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.838 2004/02/09 16:50:57 wellhard Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.839 2004/05/07 14:42:48 mast 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:612: 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:655: Inside #if defined(THREADS)
   // have an extra ref to the mutex since the MutexKey    // doesn't keep one.)    Thread.Mutex m = Thread.Mutex();    cond->wait (m->lock());    }    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);    }