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 - 2004, 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.890 2005/02/01 12:37:48 wellhard Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.891 2005/02/10 17:50:00 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:1558:    {    foreach( (array)get_port_options( get_key() ), array kv )    set( kv[0], kv[1] );    }       static int retries;    static void bind()    {    if (bound) return;    if (!port_obj) port_obj = Stdio.Port(); +  Privs privs = Privs (sprintf ("Binding %s://%s:%d/", +  (string) name, ip || "*", (int) port));    if (port_obj->bind(port, got_connection, ip))    { -  +  privs = 0;    bound = 1;    return;    } -  +  privs = 0;    report_error(LOC_M(6, "Failed to bind %s://%s:%d/ (%s)")+"\n",    (string)name, (ip||"*"), (int)port,    strerror(port_obj->errno())); -  +  werror (describe_backtrace (backtrace()));   #if constant(System.EADDRINUSE) || constant(system.EADDRINUSE)    if (   #if constant(System.EADDRINUSE)    (port_obj->errno() == System.EADDRINUSE) &&   #else /* !constant(System.EADDRINUSE) */    (port_obj->errno() == system.EADDRINUSE) &&   #endif /* constant(System.EADDRINUSE) */    (retries++ < 10)) {    // We may get spurious failures on rebinding ports on some OS'es    // (eg Linux, WIN32). See [bug 3031].