[Varnish] #1069: `varnishd -C` does not return an appropriate return code
Varnish
varnish-bugs at varnish-cache.org
Thu Dec 8 17:40:41 CET 2011
#1069: `varnishd -C` does not return an appropriate return code
----------------------+-----------------------------------------------------
Reporter: erikwebb | Type: defect
Status: new | Priority: high
Milestone: | Component: build
Version: 3.0.0 | Severity: normal
Keywords: |
----------------------+-----------------------------------------------------
To allow for easier scripting and management of VCL changes, the `varnishd
-C` check for correct syntax should return a proper return code.
Regardless of the compilation outcome, zero is returned.
{{{
$ varnishd -C -f /path/to/bad/file/default.vcl
Message from VCC-compiler:
Expected one of
'acl', 'sub', 'backend', 'director', 'probe', or 'import'
Found: 'asdasd' at
('input' Line 211 Pos 2)
}asdasd
-######
Running VCC-compiler failed, exit 1
$ echo $?
0
}}}
{{{
$ varnishd -C -f /path/to/good/file/default.vcl
/*
* NB: This file is machine generated, DO NOT EDIT!
*
* Edit and run generate.py instead
*/
struct sess;
struct cli;
typedef void vcl_init_f(struct cli *);
typedef void vcl_fini_f(struct cli *);
typedef int vcl_func_f(struct sess *sp);
...
$ echo $?
0
}}}
--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1069>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list