Debian bug #929178: wrong trap displayed inside functions

2024-03-26 Thread Oğuz
On Tuesday, March 26, 2024, Martin D Kealey wrote: > > When forwarding incoming HTML to a text-only list, most mailing list > servers will put the hyperlinks in a footnote, so that that long links > won't obscure the text they apply to. (The better ones only do this when > text text and its hyperl

Re: Debian bug #929178: wrong trap displayed inside functions

2024-03-26 Thread Martin D Kealey
On Tue, 26 Mar 2024 at 04:05, Oğuz wrote: > On Mon, Mar 25, 2024 at 8:38 PM G. Branden Robinson > wrote: > > [1] > > [1] http... > > I keep seeing this. Why don't you guys just paste the link? > When forwarding incoming HTML to a text-only list, most mailing list servers will put the hyperlinks

Re: Debian bug #929178: wrong trap displayed inside functions

2024-03-25 Thread Chet Ramey
On 3/25/24 3:47 PM, Gioele Barabucci wrote: On 25/03/24 18:13, Oğuz wrote: On Mon, Mar 25, 2024 at 7:18 PM Gioele Barabucci > wrote:  > Just for reference, neither dash nor busybox sh preserve the caller's trap: I don't know why you think they are relevant. Because t

Re: Debian bug #929178: wrong trap displayed inside functions

2024-03-25 Thread Chet Ramey
On 3/25/24 11:45 AM, Gioele Barabucci wrote: Hi, I'm forwarding a minor issue originally reported in . If a function does not set a trap, `trap` will output the command set by the caller. This is just a cosmetic issue, the right trap will be run at runtime. P

Re: Debian bug #929178: wrong trap displayed inside functions

2024-03-25 Thread Gioele Barabucci
On 25/03/24 18:13, Oğuz wrote: On Mon, Mar 25, 2024 at 7:18 PM Gioele Barabucci > wrote: > Just for reference, neither dash nor busybox sh preserve the caller's trap: I don't know why you think they are relevant. Because they are two very commonly used /bin/sh, and t

Re: Debian bug #929178: wrong trap displayed inside functions

2024-03-25 Thread G. Branden Robinson
At 2024-03-25T21:05:02+0300, Oğuz wrote: > On Mon, Mar 25, 2024 at 8:38 PM G. Branden Robinson > wrote: > > [1] > > [1] http... > > I keep seeing this. Why don't you guys just paste the link? I believe I am. https://lists.gnu.org/archive/html/bug-bash/2024-03/msg00207.html And if that gets mun

Re: Debian bug #929178: wrong trap displayed inside functions

2024-03-25 Thread Oğuz
On Mon, Mar 25, 2024 at 8:38 PM G. Branden Robinson wrote: > [1] > [1] http... I keep seeing this. Why don't you guys just paste the link?

Re: Debian bug #929178: wrong trap displayed inside functions

2024-03-25 Thread G. Branden Robinson
At 2024-03-25T19:13:39+0200, Oğuz wrote: > On Mon, Mar 25, 2024 at 7:18 PM Gioele Barabucci wrote: > > Just for reference, neither dash nor busybox sh preserve the > > caller's trap: > > I don't know why you think they are relevant. dash doesn't even support > `x=$(trap)', which is mandated by PO

Debian bug #929178: wrong trap displayed inside functions

2024-03-25 Thread Oğuz
On Mon, Mar 25, 2024 at 7:18 PM Gioele Barabucci wrote: > Just for reference, neither dash nor busybox sh preserve the caller's trap: I don't know why you think they are relevant. dash doesn't even support `x=$(trap)', which is mandated by POSIX to work; and busybox sh is a bare-bones shell for s

Re: Debian bug #929178: wrong trap displayed inside functions

2024-03-25 Thread Gioele Barabucci
On 25/03/24 17:12, Oğuz wrote: On Monday, March 25, 2024, Gioele Barabucci > wrote: If a function does not set a trap, `trap` will output the command set by the caller. This is just a cosmetic issue, the right trap will be run at runtime. Doesn't POSIX allo

Debian bug #929178: wrong trap displayed inside functions

2024-03-25 Thread Oğuz
On Monday, March 25, 2024, Gioele Barabucci wrote: > > If a function does not set a trap, `trap` will output the command set by > the caller. This is just a cosmetic issue, the right trap will be run at > runtime. > Doesn't POSIX allow this? How else do you propose we save the trap set for an eve

Debian bug #929178: wrong trap displayed inside functions

2024-03-25 Thread Gioele Barabucci
Hi, I'm forwarding a minor issue originally reported in . If a function does not set a trap, `trap` will output the command set by the caller. This is just a cosmetic issue, the right trap will be run at runtime. To reproduce this issue: #!/bin/bash