# Dose nginx support -HUP in single process mode? (Bug)

**URL:** <https://www.ruby-forum.com/t/dose-nginx-support-hup-in-single-process-mode-bug/201583>\
**Category:** NGINX\
**Created:** [January 11, 2011, 4:50am UTC](https://www.ruby-forum.com/t/dose-nginx-support-hup-in-single-process-mode-bug/201583 "2011-01-11T04:50:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [January 11, 2011, 4:50am UTC](https://www.ruby-forum.com/t/dose-nginx-support-hup-in-single-process-mode-bug/201583/1 "2011-01-11T04:50:58Z")

</div>

Hi all,

dose nginx support -HUP to reload configure in single process mode?

It seems that it does support in the code:  
‘src/os/unix/ngx\_process.c:ngx\_signal\_handler()’.

However I think there is a bug when kill HUP to nginx in single process.  
we can show it like:

add `master_process off` in configure file;  
run nginx;  
kill -HUP `cat logs/nginx.log`;  
kill -HUP `cat logs/nginx.log`; (yes, we kill HUP twice)

then wait for about half of minite, the nignx will _core_!

Nginx aborts at ‘src/core/ngx\_cycle.c:ngx\_clean\_old\_cycles(): if  
(cycle[i]-\>connections[n].fd != (ngx\_socket\_t) -1)’, where  
cycle[i].connections is NULL.  
The reason maybe nginx creates new cycle in ngx\_init\_cycle(), but didn’t  
call the ngx\_event\_process\_init() to init the connections.

Regards,  
Wu

---

<div class="post-metadata">

**Author:** ![SSWuSSBingzhengSS\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/35a633/32.png) [@SSWuSSBingzhengSS\_S](https://www.ruby-forum.com/u/SSWuSSBingzhengSS_S)\
**Post date:** [January 11, 2011, 6:35am UTC](https://www.ruby-forum.com/t/dose-nginx-support-hup-in-single-process-mode-bug/201583/2 "2011-01-11T06:35:47Z")

</div>

Hello!

On Tue, Jan 11, 2011 at 11:49:41AM +0800, Wu Bingzheng wrote:

> then wait for about half of minite, the nignx will _core_!
> 
> Nginx aborts at ‘src/core/ngx\_cycle.c:ngx\_clean\_old\_cycles(): if  
> (cycle[i]-\>connections[n].fd != (ngx\_socket\_t) -1)’, where cycle[i].connections is  
> NULL.  
> The reason maybe nginx creates new cycle in ngx\_init\_cycle(), but didn’t call  
> the ngx\_event\_process\_init() to init the connections.

Working without master process is intended for development only  
and doesn’t support configuration reloading.

Maxim D.
