Changed varnishreload to send commands to varnishadm as a batch #170
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes #168, but comes with some trade-offs:
We can no longer decorate the output of
varnishadm
with our own. This is unavoidable as far as I know, with the limitations of Bash.I even tried assigning STDOUT to FD3 and sending our decorations using
>&3 echo
invocations, but this causes all our decorations to either appear before all output emitted byvarnishadm
, or after, depending on the specific semantics used, but there is no way to interlace our output with that ofvarnishadm
in the intuitive manner we expect (as previously).Due to a bug in
varnishadm
, output cannot be suppressed when the commands are successful since any commands so sent via STDIN will always causevarnishadm
to exit with 0 (success) status. See:varnishadm
always returns 0 (success) when commands sent via STDIN varnish-cache#4012.