varnishncsa ignoring SIGHUP?
    Dag-Erling Smørgrav 
    des at linpro.no
       
    Fri May 18 10:14:32 CEST 2007
    
    
  
Eirik Øverby <ltning at anduin.net> writes:
> I'm suspecting that varnishncsa (from 1.0.3) doesn't actually listen
> to a SIGHUP - I'm unable to make it re-open its logfile.
Assuming that you didn't do something silly like redirect stdout instead
of using -w, I suspect this may be an effect of aggressive optimization
by the compiler.  Try the following patch:
Index: bin/varnishncsa/varnishncsa.c
===================================================================
--- bin/varnishncsa/varnishncsa.c       (revision 1444)
+++ bin/varnishncsa/varnishncsa.c       (working copy)
@@ -347,7 +347,7 @@
 
 /*--------------------------------------------------------------------*/
 
-static sig_atomic_t reopen;
+static volatile sig_atomic_t reopen;
 
 static void
 sighup(int sig)
DES
-- 
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no
    
    
More information about the varnish-misc
mailing list