Changeset 698

Show
Ignore:
Timestamp:
09/12/2005 12:21:34 PM (3 years ago)
Author:
moo
Message:

add variable var.PID for use in config file

Location:
branches/lighttpd-merge-1.4.x
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/lighttpd-merge-1.4.x/doc/configuration.txt

    r611 r698  
    5858  var.mymodule = "foo" 
    5959  server.modules += ( "mod_" + var.mymodule ) 
     60  var.PID is initized to the pid of lighttpd before config is parsed 
    6061 
    6162  # include, relative to dirname of main config file 
  • branches/lighttpd-merge-1.4.x/src/configfile.c

    r662 r698  
    901901        config_t context; 
    902902        data_config *dc; 
     903        data_integer *dpid; 
    903904        int ret; 
    904905        char *pos; 
     
    930931        /* default context */ 
    931932        srv->config = dc->value; 
     933        dpid = data_integer_init(); 
     934        dpid->value = getpid(); 
     935        buffer_copy_string(dpid->key, "var.PID"); 
     936        array_insert_unique(srv->config, (data_unset *)dpid); 
    932937         
    933938        ret = config_parse_file(srv, &context, fn);