Mercurial > hg > nginx-quic
comparison src/os/unix/ngx_linux_init.c @ 1921:cf148caa9347
disable rtsig automatic building in post 2.6.18 Linux kernels
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 10 Mar 2008 14:35:21 +0000 |
parents | 0b592a68aade |
children | d620f497c50f |
comparison
equal
deleted
inserted
replaced
1920:005bbad0df28 | 1921:cf148caa9347 |
---|---|
9 | 9 |
10 | 10 |
11 u_char ngx_linux_kern_ostype[50]; | 11 u_char ngx_linux_kern_ostype[50]; |
12 u_char ngx_linux_kern_osrelease[50]; | 12 u_char ngx_linux_kern_osrelease[50]; |
13 | 13 |
14 int ngx_linux_rtsig_max; | 14 int ngx_linux_rtsig_max; |
15 | 15 |
16 | 16 |
17 static ngx_os_io_t ngx_linux_io = { | 17 static ngx_os_io_t ngx_linux_io = { |
18 ngx_unix_recv, | 18 ngx_unix_recv, |
19 ngx_readv_chain, | 19 ngx_readv_chain, |
30 | 30 |
31 | 31 |
32 ngx_int_t | 32 ngx_int_t |
33 ngx_os_specific_init(ngx_log_t *log) | 33 ngx_os_specific_init(ngx_log_t *log) |
34 { | 34 { |
35 int name[2]; | |
36 size_t len; | |
37 ngx_err_t err; | |
38 struct utsname u; | 35 struct utsname u; |
39 | 36 |
40 if (uname(&u) == -1) { | 37 if (uname(&u) == -1) { |
41 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, "uname() failed"); | 38 ngx_log_error(NGX_LOG_ALERT, log, ngx_errno, "uname() failed"); |
42 return NGX_ERROR; | 39 return NGX_ERROR; |
45 (void) ngx_cpystrn(ngx_linux_kern_ostype, (u_char *) u.sysname, | 42 (void) ngx_cpystrn(ngx_linux_kern_ostype, (u_char *) u.sysname, |
46 sizeof(ngx_linux_kern_ostype)); | 43 sizeof(ngx_linux_kern_ostype)); |
47 | 44 |
48 (void) ngx_cpystrn(ngx_linux_kern_osrelease, (u_char *) u.release, | 45 (void) ngx_cpystrn(ngx_linux_kern_osrelease, (u_char *) u.release, |
49 sizeof(ngx_linux_kern_osrelease)); | 46 sizeof(ngx_linux_kern_osrelease)); |
47 | |
48 #if (NGX_HAVE_RTSIG) | |
49 { | |
50 int name[2]; | |
51 size_t len; | |
52 ngx_err_t err; | |
50 | 53 |
51 name[0] = CTL_KERN; | 54 name[0] = CTL_KERN; |
52 name[1] = KERN_RTSIGMAX; | 55 name[1] = KERN_RTSIGMAX; |
53 len = sizeof(ngx_linux_rtsig_max); | 56 len = sizeof(ngx_linux_rtsig_max); |
54 | 57 |
63 } | 66 } |
64 | 67 |
65 ngx_linux_rtsig_max = 0; | 68 ngx_linux_rtsig_max = 0; |
66 } | 69 } |
67 | 70 |
71 } | |
72 #endif | |
68 | 73 |
69 ngx_os_io = ngx_linux_io; | 74 ngx_os_io = ngx_linux_io; |
70 | 75 |
71 return NGX_OK; | 76 return NGX_OK; |
72 } | 77 } |
76 ngx_os_specific_status(ngx_log_t *log) | 81 ngx_os_specific_status(ngx_log_t *log) |
77 { | 82 { |
78 ngx_log_error(NGX_LOG_NOTICE, log, 0, "OS: %s %s", | 83 ngx_log_error(NGX_LOG_NOTICE, log, 0, "OS: %s %s", |
79 ngx_linux_kern_ostype, ngx_linux_kern_osrelease); | 84 ngx_linux_kern_ostype, ngx_linux_kern_osrelease); |
80 | 85 |
86 #if (NGX_HAVE_RTSIG) | |
81 ngx_log_error(NGX_LOG_NOTICE, log, 0, "sysctl(KERN_RTSIGMAX): %d", | 87 ngx_log_error(NGX_LOG_NOTICE, log, 0, "sysctl(KERN_RTSIGMAX): %d", |
82 ngx_linux_rtsig_max); | 88 ngx_linux_rtsig_max); |
89 #endif | |
83 } | 90 } |