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.865 2004/03/09 16:21:56 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.866 2004/03/10 16:56:42 grubba 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:4288:   #endif   }      void create_pid_file(string where)   {   #ifndef __NT__    if(!where) return;   // where = replace(where, ({ "$pid", "$uid" }),   // ({ (string)getpid(), (string)getuid() }));    +  object privs = Privs("Deleting old pid file.");    r_rm(where); -  +  privs = 0;    if(catch(Stdio.write_file(where, sprintf("%d\n%d\n", getpid(), getppid()))))    report_debug("I cannot create the pid file ("+where+").\n");   #endif   }      Pipe.pipe shuffle(Stdio.File from, Stdio.File to,    Stdio.File|void to2,    function(:void)|void callback)   {   #if efun(spider.shuffle)
Roxen.git/server/base_server/roxen.pike:4534: Inside #if defined(SNMP_AGENT)
   snmpagent->enable();    report_debug("\benabled.\n");    snmpagent->start_trap();       } else    report_debug("\bdisabled.\n");   #endif // SNMP_AGENT       enable_configurations();    +  string pid_file = Getopt.find_option(argv, "p", "pid-file"); +  if (pid_file && query("permanent_uid")) rm(pid_file); +     set_u_and_gid(); // Running with the right [e]uid:[e]gid from this point on.    -  create_pid_file(Getopt.find_option(argv, "p", "pid-file")); +  create_pid_file(pid_file);       // Done before the modules are dumped.      #ifdef RUN_SELF_TEST    enable_configurations_modules();   #else    if( Getopt.find_option( argv, 0, "no-delayed-load" ))    enable_configurations_modules();    else    foreach( configurations, Configuration c )