Mercurial > hg > nginx
comparison src/os/unix/ngx_solaris_init.c @ 183:4c698194c56d
nginx-0.0.1-2003-11-13-19:16:33 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 13 Nov 2003 16:16:33 +0000 |
parents | |
children | 11fbd0fc041d |
comparison
equal
deleted
inserted
replaced
182:3c49eaf3f522 | 183:4c698194c56d |
---|---|
1 | |
2 #include <ngx_config.h> | |
3 #include <ngx_core.h> | |
4 | |
5 | |
6 char ngx_solaris_sysname[20]; | |
7 char ngx_solaris_release[10]; | |
8 char ngx_solaris_version[50]; | |
9 | |
10 | |
11 ngx_os_io_t ngx_os_io = { | |
12 ngx_unix_recv, | |
13 NULL, | |
14 NULL, | |
15 ngx_writev_chain, | |
16 NGX_HAVE_ZEROCOPY | |
17 }; | |
18 | |
19 | |
20 int ngx_os_init(ngx_log_t *log) | |
21 { | |
22 if (sysinfo(SI_SYSNAME, ngx_solaris_sysname, sizeof(ngx_solaris_sysname)) | |
23 == -1) | |
24 { | |
25 ngx_log_error(NGX_LOG_ALERT, log, errno, "sysinfo(SI_SYSNAME) failed"); | |
26 return NGX_ERROR; | |
27 } | |
28 | |
29 if (sysinfo(SI_RELEASE, ngx_solaris_release, sizeof(ngx_solaris_release)) | |
30 == -1) | |
31 { | |
32 ngx_log_error(NGX_LOG_ALERT, log, errno, "sysinfo(SI_RELEASE) failed"); | |
33 return NGX_ERROR; | |
34 } | |
35 | |
36 if (sysinfo(SI_VERSION, ngx_solaris_version, sizeof(ngx_solaris_version)) | |
37 == -1) | |
38 { | |
39 ngx_log_error(NGX_LOG_ALERT, log, errno, "sysinfo(SI_SYSNAME) failed"); | |
40 return NGX_ERROR; | |
41 } | |
42 | |
43 ngx_log_error(NGX_LOG_INFO, log, 0, "OS: %s %s" | |
44 ngx_solaris_sysname, ngx_solaris_release); | |
45 | |
46 ngx_log_error(NGX_LOG_INFO, log, 0, "version: %s", | |
47 ngx_solaris_version); | |
48 | |
49 | |
50 return ngx_posix_init(log); | |
51 } |