Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:7153:    compressor_process = Process.create_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:7200:    "\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);    };