Mercurial > hg > nginx-quic
comparison src/os/unix/ngx_posix_init.c @ 5826:16013b71feed
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 08 Sep 2014 21:36:09 +0400 |
parents | 1209b8a7b077 |
children | cb31017e961b |
comparison
equal
deleted
inserted
replaced
5825:51fe42cc7876 | 5826:16013b71feed |
---|---|
38 if (ngx_os_specific_init(log) != NGX_OK) { | 38 if (ngx_os_specific_init(log) != NGX_OK) { |
39 return NGX_ERROR; | 39 return NGX_ERROR; |
40 } | 40 } |
41 #endif | 41 #endif |
42 | 42 |
43 ngx_init_setproctitle(log); | 43 if (ngx_init_setproctitle(log) != NGX_OK) { |
44 return NGX_ERROR; | |
45 } | |
44 | 46 |
45 ngx_pagesize = getpagesize(); | 47 ngx_pagesize = getpagesize(); |
46 ngx_cacheline_size = NGX_CPU_CACHE_LINE; | 48 ngx_cacheline_size = NGX_CPU_CACHE_LINE; |
47 | 49 |
48 for (n = ngx_pagesize; n >>= 1; ngx_pagesize_shift++) { /* void */ } | 50 for (n = ngx_pagesize; n >>= 1; ngx_pagesize_shift++) { /* void */ } |