Fixed ngx_os_signal_process() prototype.

This commit is contained in:
Ruslan Ermilov 2016-03-31 22:00:33 +03:00
parent 60a6551e1f
commit 5ad6e01b46
5 changed files with 8 additions and 8 deletions

View File

@ -1006,7 +1006,7 @@ ngx_int_t
ngx_signal_process(ngx_cycle_t *cycle, char *sig)
{
ssize_t n;
ngx_int_t pid;
ngx_pid_t pid;
ngx_file_t file;
ngx_core_conf_t *ccf;
u_char buf[NGX_INT64_LEN + 2];
@ -1044,7 +1044,7 @@ ngx_signal_process(ngx_cycle_t *cycle, char *sig)
pid = ngx_atoi(buf, ++n);
if (pid == NGX_ERROR) {
if (pid == (ngx_pid_t) NGX_ERROR) {
ngx_log_error(NGX_LOG_ERR, cycle->log, 0,
"invalid PID number \"%*s\" in \"%s\"",
n, buf, file.name.data);

View File

@ -39,7 +39,7 @@ void ngx_os_status(ngx_log_t *log);
ngx_int_t ngx_os_specific_init(ngx_log_t *log);
void ngx_os_specific_status(ngx_log_t *log);
ngx_int_t ngx_daemon(ngx_log_t *log);
ngx_int_t ngx_os_signal_process(ngx_cycle_t *cycle, char *sig, ngx_int_t pid);
ngx_int_t ngx_os_signal_process(ngx_cycle_t *cycle, char *sig, ngx_pid_t pid);
ssize_t ngx_unix_recv(ngx_connection_t *c, u_char *buf, size_t size);

View File

@ -611,7 +611,7 @@ ngx_debug_point(void)
ngx_int_t
ngx_os_signal_process(ngx_cycle_t *cycle, char *name, ngx_int_t pid)
ngx_os_signal_process(ngx_cycle_t *cycle, char *name, ngx_pid_t pid)
{
ngx_signal_t *sig;
@ -622,7 +622,7 @@ ngx_os_signal_process(ngx_cycle_t *cycle, char *name, ngx_int_t pid)
}
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
"kill(%P, %d) failed", (ngx_pid_t) pid, sig->signo);
"kill(%P, %d) failed", pid, sig->signo);
}
}

View File

@ -35,7 +35,7 @@ typedef struct {
ngx_int_t ngx_os_init(ngx_log_t *log);
void ngx_os_status(ngx_log_t *log);
ngx_int_t ngx_os_signal_process(ngx_cycle_t *cycle, char *sig, ngx_int_t pid);
ngx_int_t ngx_os_signal_process(ngx_cycle_t *cycle, char *sig, ngx_pid_t pid);
ssize_t ngx_wsarecv(ngx_connection_t *c, u_char *buf, size_t size);
ssize_t ngx_overlapped_wsarecv(ngx_connection_t *c, u_char *buf, size_t size);

View File

@ -1001,13 +1001,13 @@ ngx_single_process_cycle(ngx_cycle_t *cycle)
ngx_int_t
ngx_os_signal_process(ngx_cycle_t *cycle, char *sig, ngx_int_t pid)
ngx_os_signal_process(ngx_cycle_t *cycle, char *sig, ngx_pid_t pid)
{
HANDLE ev;
ngx_int_t rc;
char evn[NGX_PROCESS_SYNC_NAME];
ngx_sprintf((u_char *) evn, "Global\\ngx_%s_%P%Z", sig, (ngx_pid_t) pid);
ngx_sprintf((u_char *) evn, "Global\\ngx_%s_%P%Z", sig, pid);
ev = OpenEvent(EVENT_MODIFY_STATE, 0, evn);
if (ev == NULL) {