[nginx] Fixed ngx_os_signal_process() prototype.
Ruslan Ermilov
ru at nginx.com
Thu Mar 31 19:26:48 UTC 2016
details: http://hg.nginx.org/nginx/rev/3a50ccd94333
branches:
changeset: 6483:3a50ccd94333
user: Ruslan Ermilov <ru at nginx.com>
date: Thu Mar 31 22:00:33 2016 +0300
description:
Fixed ngx_os_signal_process() prototype.
diffstat:
src/core/ngx_cycle.c | 4 ++--
src/os/unix/ngx_os.h | 2 +-
src/os/unix/ngx_process.c | 4 ++--
src/os/win32/ngx_os.h | 2 +-
src/os/win32/ngx_process_cycle.c | 4 ++--
5 files changed, 8 insertions(+), 8 deletions(-)
diffs (85 lines):
diff -r 2b7dacb381ed -r 3a50ccd94333 src/core/ngx_cycle.c
--- a/src/core/ngx_cycle.c Thu Mar 31 02:34:04 2016 +0300
+++ b/src/core/ngx_cycle.c Thu Mar 31 22:00:33 2016 +0300
@@ -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, c
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);
diff -r 2b7dacb381ed -r 3a50ccd94333 src/os/unix/ngx_os.h
--- a/src/os/unix/ngx_os.h Thu Mar 31 02:34:04 2016 +0300
+++ b/src/os/unix/ngx_os.h Thu Mar 31 22:00:33 2016 +0300
@@ -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);
diff -r 2b7dacb381ed -r 3a50ccd94333 src/os/unix/ngx_process.c
--- a/src/os/unix/ngx_process.c Thu Mar 31 02:34:04 2016 +0300
+++ b/src/os/unix/ngx_process.c Thu Mar 31 22:00:33 2016 +0300
@@ -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
}
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);
}
}
diff -r 2b7dacb381ed -r 3a50ccd94333 src/os/win32/ngx_os.h
--- a/src/os/win32/ngx_os.h Thu Mar 31 02:34:04 2016 +0300
+++ b/src/os/win32/ngx_os.h Thu Mar 31 22:00:33 2016 +0300
@@ -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);
diff -r 2b7dacb381ed -r 3a50ccd94333 src/os/win32/ngx_process_cycle.c
--- a/src/os/win32/ngx_process_cycle.c Thu Mar 31 02:34:04 2016 +0300
+++ b/src/os/win32/ngx_process_cycle.c Thu Mar 31 22:00:33 2016 +0300
@@ -1001,13 +1001,13 @@ ngx_single_process_cycle(ngx_cycle_t *cy
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) {
More information about the nginx-devel
mailing list