Re: [PATCH] sub-process: print the cmd when a capability is unsupported
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Aug 15, 2017, 18:17 UTC
- Message-ID
- <20170815111725.5d009b66@twelve2.svl.corp.google.com>
- In-Reply-To
- <20170815173611.2267-1-chriscool@tuxfamily.org>
On Tue, 15 Aug 2017 19:36:11 +0200 Christian Couder <christian.couder@gmail.com> wrote:
Show 16 quoted lines
> In handshake_capabilities() we use warning() when a capability > is not supported, so the exit code of the function is 0 and no > further error is shown. This is a problem because the warning > message doesn't tell us which subprocess cmd failed. > > On the contrary if we cannot write a packet from this function, > we use error() and then subprocess_start() outputs: > > initialization for subprocess '<cmd>' failed > > so we can know which subprocess cmd failed. > > Let's improve the warning() message, so that we can know which > subprocess cmd failed. > > Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
This looks reasonable to me.
I am still wondering if protocol errors should be fatal, but that is unrelated to this patch.