[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: weird interaction between builtin cat and trap
From: |
Peng Yu |
Subject: |
Re: weird interaction between builtin cat and trap |
Date: |
Tue, 19 Apr 2022 11:30:16 -0500 |
https://www.gnu.org/software/bash/manual/html_node/Exit-Status.html
That is what is written in the bash manual. "When a command terminates
on a fatal signal whose number is N, Bash uses the value 128+N as the
exit status."
I think that you should be aware of it?
On 4/18/22, Chet Ramey <chet.ramey@case.edu> wrote:
> On 4/15/22 2:38 PM, Peng Yu wrote:
>
>
>
>> I forgot to mention the exit status. Here are the status of the above
>> command.
>>
>> $ declare -p PIPESTATUS
>> declare -a PIPESTATUS=([0]="141" [1]="1" [2]="0")
>>
>> Here is that of external cat. The error should be catched in the exit
>> status as 141 instead of printing an error message and return 1.
>
> You know this is the same thing again, right? Why is a particular exit
> status a requirement for your use case?
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
> ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
>
--
Regards,
Peng
- Re: weird interaction between builtin cat and trap, (continued)
- Re: weird interaction between builtin cat and trap, Chet Ramey, 2022/04/15
- Re: weird interaction between builtin cat and trap, Peng Yu, 2022/04/15
- Re: weird interaction between builtin cat and trap, Chet Ramey, 2022/04/15
- Re: weird interaction between builtin cat and trap, Peng Yu, 2022/04/15
- Re: weird interaction between builtin cat and trap, Peng Yu, 2022/04/15
- Re: weird interaction between builtin cat and trap, Chet Ramey, 2022/04/18
- Re: weird interaction between builtin cat and trap,
Peng Yu <=
- Re: weird interaction between builtin cat and trap, Chet Ramey, 2022/04/19
- Re: weird interaction between builtin cat and trap, Peng Yu, 2022/04/19
- Re: weird interaction between builtin cat and trap, Chet Ramey, 2022/04/20
- Re: weird interaction between builtin cat and trap, Peng Yu, 2022/04/20
- Re: weird interaction between builtin cat and trap, Chet Ramey, 2022/04/18
- Re: weird interaction between builtin cat and trap, Peng Yu, 2022/04/19
- Re: weird interaction between builtin cat and trap, Andreas Kusalananda Kähäri, 2022/04/19
- Re: weird interaction between builtin cat and trap, Peng Yu, 2022/04/19