Nginx之main初探
來源:程序員人生 發(fā)布時(shí)間:2015-03-18 09:48:02 閱讀次數(shù):3087次
Nginx main函數(shù)初探
C程序1般來講都會(huì)有主函數(shù),通常意義上主函數(shù)定義為main,Nginx也是如此。下面是Nginx中函數(shù)1級(jí)調(diào)用的框架,更詳細(xì)的級(jí)聯(lián)調(diào)用將在以后給出。
main()
-->ngx_debug_init()
-->ngx_strerror_init()
-->ngx_get_options
-->ngx_time_init()
-->ngx_regex_init()
-->ngx_ssl_init()
-->ngx_save_argv(&init_cycle, argc, argv)
-->ngx_process_options(&init_cycle)
-->ngx_process_options(&init_cycle)
-->ngx_crc32_table_init()
-->ngx_add_inherited_sockets(&init_cycle)
-->ngx_init_cycle(&init_cycle)
-->ngx_os_status(cycle->log)
-->ngx_get_conf()
-->ngx_init_signals()
-->ngx_daemon()
-->ngx_open_pipes()
-->ngx_create_pidfile()
-->ngx_log_redirect_stderr()
-->ngx_single_process_cycle()
-->ngx_master_process_cycle()
生活不易,碼農(nóng)辛苦
如果您覺得本網(wǎng)站對(duì)您的學(xué)習(xí)有所幫助,可以手機(jī)掃描二維碼進(jìn)行捐贈(zèng)