From: des Date: Fri, 18 May 2007 08:15:23 +0000 (+0000) Subject: reopen needs to be volatile, or the compiler might optimize it away. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77d2de1f706947d8ca54fb1bd9dccef003a2cc6a;p=varnish reopen needs to be volatile, or the compiler might optimize it away. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1450 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishlog/varnishlog.c b/varnish-cache/bin/varnishlog/varnishlog.c index d4f348fd..50771ccc 100644 --- a/varnish-cache/bin/varnishlog/varnishlog.c +++ b/varnish-cache/bin/varnishlog/varnishlog.c @@ -212,7 +212,7 @@ do_order(struct VSL_data *vd, int argc, char **argv) /*--------------------------------------------------------------------*/ -static sig_atomic_t reopen; +static volatile sig_atomic_t reopen; static void sighup(int sig) diff --git a/varnish-cache/bin/varnishncsa/varnishncsa.c b/varnish-cache/bin/varnishncsa/varnishncsa.c index a2596b87..6bab50be 100644 --- a/varnish-cache/bin/varnishncsa/varnishncsa.c +++ b/varnish-cache/bin/varnishncsa/varnishncsa.c @@ -347,7 +347,7 @@ h_ncsa(void *priv, enum shmlogtag tag, unsigned fd, /*--------------------------------------------------------------------*/ -static sig_atomic_t reopen; +static volatile sig_atomic_t reopen; static void sighup(int sig)