[Varnish] #1572: better exit codes - varnishd -C should return correct exit value

Varnish varnish-bugs at varnish-cache.org
Tue Aug 26 18:39:46 CEST 2014


#1572: better exit codes - varnishd -C should return correct exit value
----------------------+-----------------------
 Reporter:  zviratko  |       Owner:  slink
     Type:  defect    |      Status:  assigned
 Priority:  normal    |   Milestone:
Component:  varnishd  |     Version:  4.0.1
 Severity:  normal    |  Resolution:
 Keywords:            |
----------------------+-----------------------

Comment (by slink):

 With the patch to come, I will suggest to make two changes relevant
 regarding this ticket:
 * change the wording from "exit x" to "exited with x" so make clear that
 this is the exit code from the subprobess, not the exit code from varnishd
 * make the exit codes consistent anyway.
 Regarding 2), with {{{vcc_err_unref=off}}} the exit code should be zero as
 unreferenced symbols are not an error.

 {{{
 $ /tmp/sbin/varnishd -p vcc_err_unref=off -C -f /tmp/t.vcl >/dev/null ;
 echo $?
 Message from VCC-compiler:
 Not running as root, no priv-sep
 Unused sub foo, defined:
 ('input' Line 8 Pos 5)
 sub foo {
 ----###--

 (That was just a warning)
 Function unused
 ('input' Line 8 Pos 5)
 sub foo {
 ----###--

 (That was just a warning)
 Message from C-compiler:
 Not running as root, no priv-sep
 Message from dlopen:
 Not running as root, no priv-sep
 0
 }}}

 {{{
 $ /tmp/sbin/varnishd -p vcc_err_unref=on -C -f /tmp/t.vcl >/dev/null ;
 echo $?
 Message from VCC-compiler:
 Not running as root, no priv-sep
 Unused sub foo, defined:
 ('input' Line 8 Pos 5)
 sub foo {
 ----###--

 Running VCC-compiler failed, exited with 1

 VCL compilation failed
 1
 }}}

 {{{
 $ cat /tmp/t.vcl
 vcl 4.0;

 backend default {
         .host = "127.0.0.1";
         .port = "80";
 }

 sub foo {

 }
 }}}

-- 
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1572#comment:4>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator



More information about the varnish-bugs mailing list