Klaus Demo nginx / 5ad6e01
Fixed ngx_os_signal_process() prototype. Ruslan Ermilov 6 years ago
5 changed file(s) with 8 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
10051005 ngx_signal_process(ngx_cycle_t *cycle, char *sig)
10061006 {
10071007 ssize_t n;
1008 ngx_int_t pid;
1008 ngx_pid_t pid;
10091009 ngx_file_t file;
10101010 ngx_core_conf_t *ccf;
10111011 u_char buf[NGX_INT64_LEN + 2];
10431043
10441044 pid = ngx_atoi(buf, ++n);
10451045
1046 if (pid == NGX_ERROR) {
1046 if (pid == (ngx_pid_t) NGX_ERROR) {
10471047 ngx_log_error(NGX_LOG_ERR, cycle->log, 0,
10481048 "invalid PID number \"%*s\" in \"%s\"",
10491049 n, buf, file.name.data);
3838 ngx_int_t ngx_os_specific_init(ngx_log_t *log);
3939 void ngx_os_specific_status(ngx_log_t *log);
4040 ngx_int_t ngx_daemon(ngx_log_t *log);
41 ngx_int_t ngx_os_signal_process(ngx_cycle_t *cycle, char *sig, ngx_int_t pid);
41 ngx_int_t ngx_os_signal_process(ngx_cycle_t *cycle, char *sig, ngx_pid_t pid);
4242
4343
4444 ssize_t ngx_unix_recv(ngx_connection_t *c, u_char *buf, size_t size);
610610
611611
612612 ngx_int_t
613 ngx_os_signal_process(ngx_cycle_t *cycle, char *name, ngx_int_t pid)
613 ngx_os_signal_process(ngx_cycle_t *cycle, char *name, ngx_pid_t pid)
614614 {
615615 ngx_signal_t *sig;
616616
621621 }
622622
623623 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
624 "kill(%P, %d) failed", (ngx_pid_t) pid, sig->signo);
624 "kill(%P, %d) failed", pid, sig->signo);
625625 }
626626 }
627627
3434
3535 ngx_int_t ngx_os_init(ngx_log_t *log);
3636 void ngx_os_status(ngx_log_t *log);
37 ngx_int_t ngx_os_signal_process(ngx_cycle_t *cycle, char *sig, ngx_int_t pid);
37 ngx_int_t ngx_os_signal_process(ngx_cycle_t *cycle, char *sig, ngx_pid_t pid);
3838
3939 ssize_t ngx_wsarecv(ngx_connection_t *c, u_char *buf, size_t size);
4040 ssize_t ngx_overlapped_wsarecv(ngx_connection_t *c, u_char *buf, size_t size);
10001000
10011001
10021002 ngx_int_t
1003 ngx_os_signal_process(ngx_cycle_t *cycle, char *sig, ngx_int_t pid)
1003 ngx_os_signal_process(ngx_cycle_t *cycle, char *sig, ngx_pid_t pid)
10041004 {
10051005 HANDLE ev;
10061006 ngx_int_t rc;
10071007 char evn[NGX_PROCESS_SYNC_NAME];
10081008
1009 ngx_sprintf((u_char *) evn, "Global\\ngx_%s_%P%Z", sig, (ngx_pid_t) pid);
1009 ngx_sprintf((u_char *) evn, "Global\\ngx_%s_%P%Z", sig, pid);
10101010
10111011 ev = OpenEvent(EVENT_MODIFY_STATE, 0, evn);
10121012 if (ev == NULL) {