comparison src/os/unix/ngx_posix_init.c @ 212:679f60139863

nginx-0.0.1-2003-12-19-11:15:11 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 19 Dec 2003 08:15:11 +0000
parents 00cafae0bdf1
children 05592fd7a436
comparison
equal deleted inserted replaced
211:fd9fecc4193f 212:679f60139863
89 } 89 }
90 90
91 91
92 void ngx_signal_handler(int signo) 92 void ngx_signal_handler(int signo)
93 { 93 {
94 char *name;
95 ngx_signal_t *sig; 94 ngx_signal_t *sig;
96 95
97 for (sig = signals; sig->signo != 0; sig++) { 96 for (sig = signals; sig->signo != 0; sig++) {
98 if (sig->signo == signo) { 97 if (sig->signo == signo) {
99 break; 98 break;
100 } 99 }
101 } 100 }
102 101
103 /* STUB */ 102 #if (HAVE_STRSIGNAL)
104 name = strsignal(signo); 103
105 ngx_log_error(NGX_LOG_INFO, ngx_cycle->log, 0, 104 ngx_log_error(NGX_LOG_INFO, ngx_cycle->log, 0,
106 "signal #%d (%s: %s) received, %s", 105 "signal #%d (%s: %s) received, %s",
107 signo, sig->signame, name, sig->action); 106 signo, sig->signame, strsignal(signo), sig->action);
107 #else
108
109 ngx_log_error(NGX_LOG_INFO, ngx_cycle->log, 0,
110 "signal #%d (%s) received, %s",
111 signo, sig->signame, sig->action);
112
113 #endif
108 114
109 switch (signo) { 115 switch (signo) {
110 116
111 /* STUB */ 117 /* STUB */
112 case SIGQUIT: 118 case SIGQUIT: