[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: |
Thu, 14 Apr 2022 09:36:47 -0500 |
This code is the even simpler to reproduce the error.
$ cat ./main.sh
#!/usr/bin/env bash
# vim: set noexpandtab tabstop=2:
enable -f "$BASH_LOADABLES_PATH"/cat cat
trap 'echo EXIT' EXIT
seq 1000000 | builtin cat | {
:
} {fd}<&0
$ ./main.sh
cat: write error: Broken pipe
EXIT
On 4/14/22, Peng Yu <pengyu.ut@gmail.com> wrote:
> Hi,
>
> I got the following cat error when trap is set. If I remove the code
> of trap, then there will be no such error. Is there a bug in builtin
> cat?
--
Regards,
Peng
- weird interaction between builtin cat and trap, Peng Yu, 2022/04/14
- Re: weird interaction between builtin cat and trap,
Peng Yu <=
- Re: weird interaction between builtin cat and trap, Jesse Hathaway, 2022/04/14
- Re: weird interaction between builtin cat and trap, Chet Ramey, 2022/04/14
- Re: weird interaction between builtin cat and trap, Jesse Hathaway, 2022/04/14
- Re: weird interaction between builtin cat and trap, Peng Yu, 2022/04/14
- Re: weird interaction between builtin cat and trap, Dennis Williamson, 2022/04/14
- Re: weird interaction between builtin cat and trap, Greg Wooledge, 2022/04/14
- 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