blob: 26bee873241aa5823d68d920c0fdf706130fccfc (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/*
* Copyright (C) Igor Sysoev
* Copyright (C) NGINX, Inc.
*/
#include <nxt_main.h>
#include <nxt_runtime.h>
extern char **environ;
int nxt_cdecl
main(int argc, char **argv)
{
nxt_int_t ret;
if (nxt_lib_start("unit", argv, &environ) != NXT_OK) {
return 1;
}
// nxt_main_log.level = NXT_LOG_INFO;
nxt_main_log.handler = nxt_log_time_handler;
ret = nxt_runtime_create(&nxt_main_task);
if (ret != NXT_OK) {
return 1;
}
nxt_log(&nxt_main_task, NXT_LOG_INFO, "unit " NXT_VERSION " started");
nxt_event_engine_start(nxt_main_task.thread->engine);
nxt_unreachable();
return 0;
}
|