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

Wu Bingzheng wubingzheng at
Tue Jan 11 06:49:41 MSK 2011

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.


More information about the nginx mailing list