comparison src/os/unix/ngx_solaris_init.c @ 88:e916a291e9aa NGINX_0_1_44

nginx 0.1.44 *) Feature: the IMAP/POP3 proxy supports SSL. *) Feature: the "proxy_timeout" directive of the ngx_imap_proxy_module. *) Feature: the "userid_mark" directive. *) Feature: the $remote_user variable value is determined independently of authorization use.
author Igor Sysoev <http://sysoev.ru>
date Tue, 06 Sep 2005 00:00:00 +0400
parents 6ae11d59d10e
children 10cc350ed8a1
comparison
equal deleted inserted replaced
87:5b7ec80c3c40 88:e916a291e9aa
11 char ngx_solaris_sysname[20]; 11 char ngx_solaris_sysname[20];
12 char ngx_solaris_release[10]; 12 char ngx_solaris_release[10];
13 char ngx_solaris_version[50]; 13 char ngx_solaris_version[50];
14 14
15 15
16 ngx_os_io_t ngx_os_io = { 16 static ngx_os_io_t ngx_solaris_io = {
17 ngx_unix_recv, 17 ngx_unix_recv,
18 ngx_readv_chain, 18 ngx_readv_chain,
19 ngx_unix_send, 19 ngx_unix_send,
20 #if (NGX_HAVE_SENDFILE) 20 #if (NGX_HAVE_SENDFILE)
21 ngx_solaris_sendfilev_chain, 21 ngx_solaris_sendfilev_chain,
25 0 25 0
26 #endif 26 #endif
27 }; 27 };
28 28
29 29
30 ngx_int_t ngx_os_init(ngx_log_t *log) 30 ngx_int_t
31 ngx_os_specific_init(ngx_log_t *log)
31 { 32 {
32 if (sysinfo(SI_SYSNAME, ngx_solaris_sysname, sizeof(ngx_solaris_sysname)) 33 if (sysinfo(SI_SYSNAME, ngx_solaris_sysname, sizeof(ngx_solaris_sysname))
33 == -1) 34 == -1)
34 { 35 {
35 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, 36 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
36 "sysinfo(SI_SYSNAME) failed"); 37 "sysinfo(SI_SYSNAME) failed");
37 return NGX_ERROR; 38 return NGX_ERROR;
38 } 39 }
39 40
40 if (sysinfo(SI_RELEASE, ngx_solaris_release, sizeof(ngx_solaris_release)) 41 if (sysinfo(SI_RELEASE, ngx_solaris_release, sizeof(ngx_solaris_release))
41 == -1) 42 == -1)
42 { 43 {
43 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, 44 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
44 "sysinfo(SI_RELEASE) failed"); 45 "sysinfo(SI_RELEASE) failed");
45 return NGX_ERROR; 46 return NGX_ERROR;
46 } 47 }
47 48
48 if (sysinfo(SI_VERSION, ngx_solaris_version, sizeof(ngx_solaris_version)) 49 if (sysinfo(SI_VERSION, ngx_solaris_version, sizeof(ngx_solaris_version))
49 == -1) 50 == -1)
50 { 51 {
51 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, 52 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno,
52 "sysinfo(SI_SYSNAME) failed"); 53 "sysinfo(SI_SYSNAME) failed");
53 return NGX_ERROR; 54 return NGX_ERROR;
54 } 55 }
55 56
56 57
57 return ngx_posix_init(log); 58 ngx_os_io = ngx_solaris_io;
59
60 return NGX_OK;;
58 } 61 }
59 62
60 63
61 void ngx_os_status(ngx_log_t *log) 64 void
65 ngx_os_specific_status(ngx_log_t *log)
62 { 66 {
63 67
64 ngx_log_error(NGX_LOG_NOTICE, log, 0, "OS: %s %s", 68 ngx_log_error(NGX_LOG_NOTICE, log, 0, "OS: %s %s",
65 ngx_solaris_sysname, ngx_solaris_release); 69 ngx_solaris_sysname, ngx_solaris_release);
66 70
67 ngx_log_error(NGX_LOG_NOTICE, log, 0, "version: %s", 71 ngx_log_error(NGX_LOG_NOTICE, log, 0, "version: %s",
68 ngx_solaris_version); 72 ngx_solaris_version);
69
70 ngx_posix_status(log);
71 } 73 }