diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2014-09-08 21:36:09 +0400 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2014-09-08 21:36:09 +0400 |
commit | cb8a0327ab689867f6ea9e05fcb3242883e83bc2 (patch) | |
tree | 0254ef9683b5ba36a44d10f6a9769db7362f6f6f /src/os/unix/ngx_setproctitle.h | |
parent | 90df702bf86e4d9a9a2f319743598bc7aa1f8f57 (diff) | |
download | nginx-cb8a0327ab689867f6ea9e05fcb3242883e83bc2.tar.gz nginx-cb8a0327ab689867f6ea9e05fcb3242883e83bc2.zip |
Added ngx_init_setproctitle() return code check.
The ngx_init_setproctitle() function, as used on systems without
setproctitle(3), may fail due to memory allocation errors, and
therefore its return code needs to be checked.
Reported by Markus Linnala.
Diffstat (limited to 'src/os/unix/ngx_setproctitle.h')
-rw-r--r-- | src/os/unix/ngx_setproctitle.h | 4 |
1 files changed, 2 insertions, 2 deletions
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 */ |