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 - 2009, 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.1114 2012/06/07 12:12:09 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.1115 2012/06/08 14:08:52 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:7348:    compressor_process = Process.Process(({ compressor_program,    compress_file }));    return;    }    }    }       private void do_open_co() { handle(do_open); }    private void do_open(void|object mutex_key)    { -  if (!this_object()) return; // We've been destructed, return +     if (!mutex_key) mutex_key = lock->lock(); -  if (!this_object()) return; // We've been destructed, return +        mixed parent;    if (catch { parent = function_object(object_program(this_object())); } ||    !parent) {    // Our parent (aka the configuration) has been destructed.    // Time to die.    remove_call_out(do_open_co);    remove_call_out(do_close_co);    destruct();    return;
Roxen.git/server/base_server/roxen.pike:7395:    "\n");    return;    }    opened = 1;    remove_call_out(do_open_co);    call_out(do_open_co, 900);    remove_call_out(do_close_co);    call_out(do_close_co, 10.0);    }    -  private void do_close_co() { handle(do_close); } -  private void do_close() +  private void do_close_co() { handle(close); } +  +  void close()    { -  if (!this_object()) return; // We've been destructed, return +     object mutex_key = lock->lock(); -  if (!this_object()) return; // We've been destructed, return +        destruct( fd );    opened = 0;    }       private array(string) write_buf = ({});    private void do_the_write_co() { handle(do_the_write); }    private void do_the_write()    { -  if (!this_object()) return; // We've been destructed, return +     object mutex_key = lock->lock(); -  if (!this_object()) return; // We've been destructed, return +        if (!opened) do_open(mutex_key);    if (!opened) return;    mixed err = catch (fd->write(write_buf));    if (err)    catch {    foreach (write_buf, string str)    if (String.width (str) > 8)    werror ("Got wide string in log output: %O\n", str);    };