comparison src/os/unix/ngx_linux_init.c @ 6126:adba26ff70b5

Removed the obsolete rtsig module.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 23 Apr 2015 14:17:40 +0300
parents d620f497c50f
children 8f038068f4bc
comparison
equal deleted inserted replaced
6125:4dc8e7b62216 6126:adba26ff70b5
9 #include <ngx_core.h> 9 #include <ngx_core.h>
10 10
11 11
12 u_char ngx_linux_kern_ostype[50]; 12 u_char ngx_linux_kern_ostype[50];
13 u_char ngx_linux_kern_osrelease[50]; 13 u_char ngx_linux_kern_osrelease[50];
14
15 int ngx_linux_rtsig_max;
16 14
17 15
18 static ngx_os_io_t ngx_linux_io = { 16 static ngx_os_io_t ngx_linux_io = {
19 ngx_unix_recv, 17 ngx_unix_recv,
20 ngx_readv_chain, 18 ngx_readv_chain,
44 sizeof(ngx_linux_kern_ostype)); 42 sizeof(ngx_linux_kern_ostype));
45 43
46 (void) ngx_cpystrn(ngx_linux_kern_osrelease, (u_char *) u.release, 44 (void) ngx_cpystrn(ngx_linux_kern_osrelease, (u_char *) u.release,
47 sizeof(ngx_linux_kern_osrelease)); 45 sizeof(ngx_linux_kern_osrelease));
48 46
49 #if (NGX_HAVE_RTSIG)
50 {
51 int name[2];
52 size_t len;
53 ngx_err_t err;
54
55 name[0] = CTL_KERN;
56 name[1] = KERN_RTSIGMAX;
57 len = sizeof(ngx_linux_rtsig_max);
58
59 if (sysctl(name, 2, &ngx_linux_rtsig_max, &len, NULL, 0) == -1) {
60 err = ngx_errno;
61
62 if (err != NGX_ENOTDIR && err != NGX_ENOSYS) {
63 ngx_log_error(NGX_LOG_ALERT, log, err,
64 "sysctl(KERN_RTSIGMAX) failed");
65
66 return NGX_ERROR;
67 }
68
69 ngx_linux_rtsig_max = 0;
70 }
71
72 }
73 #endif
74
75 ngx_os_io = ngx_linux_io; 47 ngx_os_io = ngx_linux_io;
76 48
77 return NGX_OK; 49 return NGX_OK;
78 } 50 }
79 51
81 void 53 void
82 ngx_os_specific_status(ngx_log_t *log) 54 ngx_os_specific_status(ngx_log_t *log)
83 { 55 {
84 ngx_log_error(NGX_LOG_NOTICE, log, 0, "OS: %s %s", 56 ngx_log_error(NGX_LOG_NOTICE, log, 0, "OS: %s %s",
85 ngx_linux_kern_ostype, ngx_linux_kern_osrelease); 57 ngx_linux_kern_ostype, ngx_linux_kern_osrelease);
86
87 #if (NGX_HAVE_RTSIG)
88 ngx_log_error(NGX_LOG_NOTICE, log, 0, "sysctl(KERN_RTSIGMAX): %d",
89 ngx_linux_rtsig_max);
90 #endif
91 } 58 }