Welcome! Log In Create A New Profile

Advanced

Re: SIGWINCH & aborting, a cleaner solution?

August 18, 2011 10:56AM
On Thu, Aug 18, 2011 at 04:43:02PM +0200, Félix Delval wrote:
> On Thu, Aug 18, 2011 at 10:29 AM, Félix Delval <felixdelval@gmail.com>wrote:
>
> > Hello,
> >
> > I am using nginx in a terminal as development server, not as a daemon..
> >
> > Each time nginx receives the SIGWINCH signals, it says : 2011/08/18
> > 10:12:54 [alert] 12887#0: aborting
> >
> > I have seen in a email from Igor Sysoev, that he advised to modify the
> > source code and deactivate the handlinghttp://forum.nginx.org/read.php?2,6771of the signal there. It works fine, but it doesn't seem to me as long-term
> > reliable solution. I know I am not the only one who has been asking about
> > this issue.
> >
> > Does somebody have solution that does not include patching?
> >
> >
> >Do you run with "daemon off" only or with master_process off" too ? I think
> SIGWINCH should just be disabled in non-daemon mode.
>
> I only had 'deamon off', adding 'master_process off' solved my issue. I
> didn't know what that parameter was doing exactly.
>
> I will communicate the result.
>
> Thank you very much.

The attached patch should fix the issue.


--
Igor Sysoev
Index: src/os/unix/ngx_process.c
===================================================================
--- src/os/unix/ngx_process.c (revision 4004)
+++ src/os/unix/ngx_process.c (working copy)
@@ -339,8 +339,10 @@
break;

case ngx_signal_value(NGX_NOACCEPT_SIGNAL):
- ngx_noaccept = 1;
- action = ", stop accepting connections";
+ if (ngx_daemonized) {
+ ngx_noaccept = 1;
+ action = ", stop accepting connections";
+ }
break;

case ngx_signal_value(NGX_RECONFIGURE_SIGNAL):
@@ -392,6 +394,9 @@
switch (signo) {

case ngx_signal_value(NGX_NOACCEPT_SIGNAL):
+ if (!ngx_daemonized) {
+ break;
+ }
ngx_debug_quit = 1;
case ngx_signal_value(NGX_SHUTDOWN_SIGNAL):
ngx_quit = 1;
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

SIGWINCH & aborting, a cleaner solution?

Félix Delval August 18, 2011 04:40AM

Re: SIGWINCH & aborting, a cleaner solution?

Igor Sysoev August 18, 2011 04:44AM

Re: SIGWINCH & aborting, a cleaner solution?

Félix Delval August 18, 2011 10:44AM

Re: SIGWINCH & aborting, a cleaner solution?

Igor Sysoev August 18, 2011 10:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 120
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready