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.1116 2012/06/08 14:39:26 mast Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.1117 2012/06/09 14:15:07 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:7411:    }       private array(string) write_buf = ({});    private void do_the_write()    {    object mutex_key = lock->lock();       if (!opened) do_open(mutex_key);    if (!opened) return;    if (!sizeof (write_buf)) return; -  mixed err = catch (fd->write(write_buf)); +  +  array(string) buf = write_buf; +  // Relying on the interpreter lock here. +  write_buf = ({}); +  +  mixed err = catch (fd->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);    }; -  write_buf = ({}); +     remove_call_out(do_close_co);    call_out(do_close_co, 10.0); -  +     if (err)    throw (err);    }       int write( string what )    {    write_buf += ({ what });    if (sizeof (write_buf) == 1)    background_run (1, do_the_write);    return strlen(what);    }   }