>> Here is a more practical example which demonstrates the problem:
>>
>> $ echo false | dbclient -T r...@host.example.com
>> $ echo $?
>> 0
>
> I think this should now _really_ be fixed with
> https://secure.ucc.asn.au/hg/dropbear/rev/79eef94ccea9
>
> dbclient was ignoring all packets for
Hi Mike,
> On Sat 10/11/2018, at 12:52 am, W. Michael Petullo wrote:
>
>
> Here is a more practical example which demonstrates the problem:
>
> $ echo false | dbclient -T r...@host.example.com
> $ echo $?
> 0
I think this should now _really_ be fixed with
2018-11-10 12:53 skrev W. Michael Petullo:
I read the reference you provided, but I am not yet convinced. Is it
not
true that pipelines by default produce the exit code from the
right-most
program in the pipeline?
You're right and I am wrong. The exit code is the right-most command.
Sorry
On Sat, Nov 10, 2018 at 10:44:03AM +0100, Peter Krefting wrote:
> >$ echo false | dbclient -T r...@host.example.com
> >$ echo $?
> >0
>
> That is because $? contains the exit status of the left-most command (echo),
> not the pipe. If you are using a bash shell, you need to use PIPESTATUS to
>
>> Here is a more practical example which demonstrates the problem:
>>
>> $ echo false | dbclient -T r...@host.example.com
>> $ echo $?
>> 0
> That is because $? contains the exit status of the left-most command (echo),
> not the pipe. If you are using a bash shell, you need to use PIPESTATUS
2018-11-09 17:52 skrev W. Michael Petullo:
Here is a more practical example which demonstrates the problem:
$ echo false | dbclient -T r...@host.example.com
$ echo $?
0
That is because $? contains the exit status of the left-most command
(echo), not the pipe. If you are using a bash shell,
>>> I am using Dropbear v2017.75 as found on OpenWrt.
>>>
>>> echo input | ssh -T h; echo $?
>>>
>>> Despite the error occurring, the above command line prints `0' rather
>>> than `1.' Since this triggers the error, I would expect the latter
>>> instead.
>> After looking at the code, it appears
Hi Michael,
On 2018-11-09 3:48 pm, W. Michael Petullo wrote:
>> I am using Dropbear v2017.75 as found on OpenWrt.
>>
>> echo input | ssh -T h; echo $?
>>
>> Despite the error occurring, the above command line prints `0' rather
>> than `1.' Since this triggers the error, I would expect the
> I am using Dropbear v2017.75 as found on OpenWrt.
>
> I am building a system around a special shell which exits with the value
> of `1' upon encountering certain errors. Let us assume this shell runs
> on the host "h." My aim is that the following will print `1' if such an
> error occurs (using
I am using Dropbear v2017.75 as found on OpenWrt.
I am building a system around a special shell which exits with the value
of `1' upon encountering certain errors. Let us assume this shell runs
on the host "h." My aim is that the following will print `1' if such an
error occurs (using Dropbear's
10 matches
Mail list logo