aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/os/unix/ngx_posix_init.c4
-rw-r--r--src/os/unix/ngx_setproctitle.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/os/unix/ngx_posix_init.c b/src/os/unix/ngx_posix_init.c
index 9a4de022d..bf3a310aa 100644
--- a/src/os/unix/ngx_posix_init.c
+++ b/src/os/unix/ngx_posix_init.c
@@ -40,7 +40,9 @@ ngx_os_init(ngx_log_t *log)
}
#endif
- ngx_init_setproctitle(log);
+ if (ngx_init_setproctitle(log) != NGX_OK) {
+ return NGX_ERROR;
+ }
ngx_pagesize = getpagesize();
ngx_cacheline_size = NGX_CPU_CACHE_LINE;
diff --git a/src/os/unix/ngx_setproctitle.h b/src/os/unix/ngx_setproctitle.h
index 2323408c4..c3636628b 100644
--- a/src/os/unix/ngx_setproctitle.h
+++ b/src/os/unix/ngx_setproctitle.h
@@ -13,7 +13,7 @@
/* FreeBSD, NetBSD, OpenBSD */
-#define ngx_init_setproctitle(log)
+#define ngx_init_setproctitle(log) NGX_OK
#define ngx_setproctitle(title) setproctitle("%s", title)
@@ -39,7 +39,7 @@ void ngx_setproctitle(char *title);
#else
-#define ngx_init_setproctitle(log)
+#define ngx_init_setproctitle(log) NGX_OK
#define ngx_setproctitle(title)
#endif /* OSes */