• 大小: 0.99M
    文件类型: .gz
    金币: 1
    下载: 0 次
    发布日期: 2023-10-11
  • 语言: 其他
  • 标签: 其他  

资源简介

nginx-1.17.1.tar.gz

资源截图

代码片段和文件信息


/*
 * Copyright (C) Igor Sysoev
 * Copyright (C) Nginx Inc.
 */


#include 
#include 
#include 


static void ngx_show_version_info(void);
static ngx_int_t ngx_add_inherited_sockets(ngx_cycle_t *cycle);
static void ngx_cleanup_environment(void *data);
static ngx_int_t ngx_get_options(int argc char *const *argv);
static ngx_int_t ngx_process_options(ngx_cycle_t *cycle);
static ngx_int_t ngx_save_argv(ngx_cycle_t *cycle int argc char *const *argv);
static void *ngx_core_module_create_conf(ngx_cycle_t *cycle);
static char *ngx_core_module_init_conf(ngx_cycle_t *cycle void *conf);
static char *ngx_set_user(ngx_conf_t *cf ngx_command_t *cmd void *conf);
static char *ngx_set_env(ngx_conf_t *cf ngx_command_t *cmd void *conf);
static char *ngx_set_priority(ngx_conf_t *cf ngx_command_t *cmd void *conf);
static char *ngx_set_cpu_affinity(ngx_conf_t *cf ngx_command_t *cmd
    void *conf);
static char *ngx_set_worker_processes(ngx_conf_t *cf ngx_command_t *cmd
    void *conf);
static char *ngx_load_module(ngx_conf_t *cf ngx_command_t *cmd void *conf);
#if (NGX_HAVE_DLOPEN)
static void ngx_unload_module(void *data);
#endif


static ngx_conf_enum_t  ngx_debug_points[] = {
    { ngx_string(“stop“) NGX_DEBUG_POINTS_STOP }
    { ngx_string(“abort“) NGX_DEBUG_POINTS_ABORT }
    { ngx_null_string 0 }
};


static ngx_command_t  ngx_core_commands[] = {

    { ngx_string(“daemon“)
      NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_FLAG
      ngx_conf_set_flag_slot
      0
      offsetof(ngx_core_conf_t daemon)
      NULL }

    { ngx_string(“master_process“)
      NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_FLAG
      ngx_conf_set_flag_slot
      0
      offsetof(ngx_core_conf_t master)
      NULL }

    { ngx_string(“timer_resolution“)
      NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1
      ngx_conf_set_msec_slot
      0
      offsetof(ngx_core_conf_t timer_resolution)
      NULL }

    { ngx_string(“pid“)
      NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1
      ngx_conf_set_str_slot
      0
      offsetof(ngx_core_conf_t pid)
      NULL }

    { ngx_string(“lock_file“)
      NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1
      ngx_conf_set_str_slot
      0
      offsetof(ngx_core_conf_t lock_file)
      NULL }

    { ngx_string(“worker_processes“)
      NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1
      ngx_set_worker_processes
      0
      0
      NULL }

    { ngx_string(“debug_points“)
      NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1
      ngx_conf_set_enum_slot
      0
      offsetof(ngx_core_conf_t debug_points)
      &ngx_debug_points }

    { ngx_string(“user“)
      NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE12
      ngx_set_user
      0
      0
      NULL }

    { ngx_string(“worker_priority“)
      NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1
      ngx_set_priority
      0
      0
      NULL }

    { ngx_string(“worker_cpu_affinity“)
      NGX_MAIN

评论

共有 条评论