More refactoring relicts removed.

This commit is contained in:
Igor Sysoev
2017-02-01 15:07:23 +03:00
parent d4d36c65fa
commit 8942550b13
7 changed files with 20 additions and 26 deletions

View File

@@ -59,7 +59,7 @@ nxt_thread_declare_data(nxt_cycle_t *, nxt_thread_cycle_data);
nxt_int_t nxt_int_t
nxt_cycle_create(nxt_thread_t *thr, nxt_task_t *task, nxt_cycle_t *previous, nxt_cycle_create(nxt_thread_t *thr, nxt_task_t *task, nxt_cycle_t *previous,
nxt_cycle_cont_t start, nxt_str_t *config_name) nxt_cycle_cont_t start)
{ {
nxt_int_t ret; nxt_int_t ret;
nxt_cycle_t *cycle; nxt_cycle_t *cycle;
@@ -78,7 +78,6 @@ nxt_cycle_create(nxt_thread_t *thr, nxt_task_t *task, nxt_cycle_t *previous,
cycle->mem_pool = mp; cycle->mem_pool = mp;
cycle->previous = previous; cycle->previous = previous;
cycle->config_name = config_name;
if (previous == NULL) { if (previous == NULL) {
cycle->prefix = nxt_current_directory(mp); cycle->prefix = nxt_current_directory(mp);
@@ -803,7 +802,7 @@ nxt_cycle_conf_init(nxt_thread_t *thr, nxt_cycle_t *cycle)
cycle->auxiliary_threads = 2; cycle->auxiliary_threads = 2;
cycle->user_cred.user = "nobody"; cycle->user_cred.user = "nobody";
cycle->group = NULL; cycle->group = NULL;
cycle->pid = "nginman.pid"; cycle->pid = "nginext.pid";
cycle->error_log = "error.log"; cycle->error_log = "error.log";
if (nxt_cycle_conf_read_cmd(thr, cycle) != NXT_OK) { if (nxt_cycle_conf_read_cmd(thr, cycle) != NXT_OK) {

View File

@@ -33,8 +33,6 @@ struct nxt_cycle_s {
nxt_cycle_cont_t start; nxt_cycle_cont_t start;
nxt_str_t *config_name;
nxt_str_t *conf_prefix; nxt_str_t *conf_prefix;
nxt_str_t *prefix; nxt_str_t *prefix;
@@ -121,7 +119,7 @@ nxt_thread_cycle(void)
nxt_int_t nxt_cycle_create(nxt_thread_t *thr, nxt_task_t *task, nxt_int_t nxt_cycle_create(nxt_thread_t *thr, nxt_task_t *task,
nxt_cycle_t *previous, nxt_cycle_cont_t start, nxt_str_t *config_name); nxt_cycle_t *previous, nxt_cycle_cont_t start);
void nxt_cycle_quit(nxt_task_t *task, nxt_cycle_t *cycle); void nxt_cycle_quit(nxt_task_t *task, nxt_cycle_t *cycle);
void nxt_cycle_event_engine_free(nxt_cycle_t *cycle); void nxt_cycle_event_engine_free(nxt_cycle_t *cycle);

View File

@@ -17,9 +17,7 @@ main(int argc, char **argv)
nxt_int_t ret; nxt_int_t ret;
nxt_thread_t *thr; nxt_thread_t *thr;
static nxt_str_t nxt_config_name = nxt_string_zero("nginx.conf"); if (nxt_lib_start("nginext", argv, &environ) != NXT_OK) {
if (nxt_lib_start("nginman", argv, &environ) != NXT_OK) {
return 1; return 1;
} }
@@ -30,9 +28,9 @@ main(int argc, char **argv)
nxt_main_log.handler = nxt_log_time_handler; nxt_main_log.handler = nxt_log_time_handler;
nxt_log_error(NXT_LOG_INFO, thr->log, "nginman started"); nxt_log_error(NXT_LOG_INFO, thr->log, "nginext started");
ret = nxt_cycle_create(thr, &nxt_main_task, NULL, NULL, &nxt_config_name); ret = nxt_cycle_create(thr, &nxt_main_task, NULL, NULL);
if (ret != NXT_OK) { if (ret != NXT_OK) {
return 1; return 1;

View File

@@ -105,7 +105,7 @@ nxt_master_process_title(void)
end = title + sizeof(title); end = title + sizeof(title);
p = nxt_sprintf(title, end, "nginman: master process %s", p = nxt_sprintf(title, end, "nginext: master process %s",
nxt_process_argv[0]); nxt_process_argv[0]);
for (i = 1; nxt_process_argv[i] != NULL; i++) { for (i = 1; nxt_process_argv[i] != NULL; i++) {
@@ -199,8 +199,7 @@ nxt_master_process_sighup_handler(nxt_task_t *task, void *obj, void *data)
if (!cycle->reconfiguring) { if (!cycle->reconfiguring) {
(void) nxt_cycle_create(task->thread, task, cycle, (void) nxt_cycle_create(task->thread, task, cycle,
nxt_master_process_new_cycle, nxt_master_process_new_cycle);
cycle->config_name);
} }
} }
@@ -430,8 +429,8 @@ nxt_master_process_sigusr2_handler(nxt_task_t *task, void *obj, void *data)
* tested explicitly. There is no workaround for this race condition * tested explicitly. There is no workaround for this race condition
* in Solaris zons. To eliminate this race condition in Solaris * in Solaris zons. To eliminate this race condition in Solaris
* zone the old master process should be quit only when both * zone the old master process should be quit only when both
* "nginman.pid.oldbin" (created by the old master process) and * "nginext.pid.oldbin" (created by the old master process) and
* "nginman.pid" (created by the new master process) files exists. * "nginext.pid" (created by the new master process) files exists.
*/ */
ignore = 1; ignore = 1;
} }

View File

@@ -63,7 +63,7 @@ static int nxt_php_read_post(char *buffer, uint count_bytes TSRMLS_DC);
static sapi_module_struct nxt_php_sapi_module = static sapi_module_struct nxt_php_sapi_module =
{ {
(char *) "cli-server", (char *) "cli-server",
(char *) "nginman", (char *) "nginext",
nxt_php_startup, /* startup */ nxt_php_startup, /* startup */
php_module_shutdown_wrapper, /* shutdown */ php_module_shutdown_wrapper, /* shutdown */
@@ -351,13 +351,13 @@ nxt_php_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
static const u_char default_repsonse[] static const u_char default_repsonse[]
= "HTTP/1.1 200 OK\r\n" = "HTTP/1.1 200 OK\r\n"
"Server: nginman/0.1\r\n" "Server: nginext/0.1\r\n"
"Content-Type: text/html; charset=UTF-8\r\n" "Content-Type: text/html; charset=UTF-8\r\n"
"Connection: close\r\n" "Connection: close\r\n"
"\r\n"; "\r\n";
static const u_char default_headers[] static const u_char default_headers[]
= "Server: nginman/0.1\r\n" = "Server: nginext/0.1\r\n"
"Connection: close\r\n"; "Connection: close\r\n";
r = SG(server_context); r = SG(server_context);

View File

@@ -57,7 +57,7 @@ nxt_application_module_t nxt_python_module = {
static PyMethodDef nxt_py_start_resp_method[] = { static PyMethodDef nxt_py_start_resp_method[] = {
{"nginman_start_response", nxt_py_start_resp, METH_VARARGS, ""} {"nginext_start_response", nxt_py_start_resp, METH_VARARGS, ""}
}; };
@@ -71,7 +71,7 @@ static PyMethodDef nxt_py_input_methods[] = {
static PyTypeObject nxt_py_input_type = { static PyTypeObject nxt_py_input_type = {
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
"nginman._input", /* tp_name */ "nginext._input", /* tp_name */
(int) sizeof(nxt_py_input_t), /* tp_basicsize */ (int) sizeof(nxt_py_input_t), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor) nxt_py_input_dealloc, /* tp_dealloc */ (destructor) nxt_py_input_dealloc, /* tp_dealloc */
@@ -90,7 +90,7 @@ static PyTypeObject nxt_py_input_type = {
0, /* tp_setattro */ 0, /* tp_setattro */
0, /* tp_as_buffer */ 0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */ Py_TPFLAGS_DEFAULT, /* tp_flags */
"nginman input object.", /* tp_doc */ "nginext input object.", /* tp_doc */
0, /* tp_traverse */ 0, /* tp_traverse */
0, /* tp_clear */ 0, /* tp_clear */
0, /* tp_richcompare */ 0, /* tp_richcompare */
@@ -228,7 +228,7 @@ nxt_python_wsgi_init(nxt_thread_t *thr, nxt_cycle_t *cycle)
nxt_py_environ_ptyp = obj; nxt_py_environ_ptyp = obj;
obj = Py_BuildValue("[s]", "nginman"); obj = Py_BuildValue("[s]", "nginext");
if (obj == NULL) { if (obj == NULL) {
nxt_log_alert(thr->log, nxt_log_alert(thr->log,
"Python failed to create the \"sys.argv\" list"); "Python failed to create the \"sys.argv\" list");
@@ -295,7 +295,7 @@ nxt_python_init(nxt_thread_t *thr)
return NXT_ERROR; return NXT_ERROR;
} }
pModule = PyImport_ExecCodeModuleEx((char *) "_wsgi_nginman", co, (char *) script); pModule = PyImport_ExecCodeModuleEx((char *) "_wsgi_nginext", co, (char *) script);
Py_XDECREF(co); Py_XDECREF(co);
#endif #endif
@@ -816,7 +816,7 @@ nxt_py_start_resp(PyObject *self, PyObject *args)
static const u_char resp[] = "HTTP/1.1 "; static const u_char resp[] = "HTTP/1.1 ";
static const u_char default_headers[] static const u_char default_headers[]
= "Server: nginman/0.1\r\n" = "Server: nginext/0.1\r\n"
"Connection: close\r\n"; "Connection: close\r\n";
n = PyTuple_GET_SIZE(args); n = PyTuple_GET_SIZE(args);

View File

@@ -59,7 +59,7 @@ nxt_worker_process_start(void *data)
nxt_log_error(NXT_LOG_INFO, thr->log, "worker process"); nxt_log_error(NXT_LOG_INFO, thr->log, "worker process");
nxt_process_title("nginman: worker process"); nxt_process_title("nginext: worker process");
cycle->type = NXT_PROCESS_WORKER; cycle->type = NXT_PROCESS_WORKER;