Re: shell trap vs inherited signal dispositions

2025-05-03 Thread Robert Elz
Date:Fri, 2 May 2025 22:56:43 +0300 From:Valery Ushakov Message-ID: | "trap -- - HUP" means the disposition for HUP is SIG_DFL, No it doesn't, it means there's no trap set for SIGHUP. You get the same for a whole bunch of other signals that the shell manipulates

Re: shell trap vs inherited signal dispositions

2025-05-03 Thread Robert Elz
Date:Fri, 2 May 2025 15:50:31 +0300 From:Valery Ushakov Message-ID: | When run under nohup bash prints that SIGHUP is ignored (empty | string): | | $ rm -f nohup.out; nohup bash -c 'trap -p'; cat nohup.out | sending output to nohup.out | trap -- ''

Re: shell trap vs inherited signal dispositions

2025-05-02 Thread Valery Ushakov
On Fri, May 02, 2025 at 15:21:59 +0200, Edgar Fuß wrote: > A shell must not trap signals that are ignored when the shell is called. I am aware of that. I don't see what you mean by that comment given the question and how it's relevant. "trap -- - HUP" means the disposition for HUP is SIG_DFL, w

Re: shell trap vs inherited signal dispositions

2025-05-02 Thread Edgar Fuß
A shell must not trap signals that are ignored when the shell is called.

shell trap vs inherited signal dispositions

2025-05-02 Thread Valery Ushakov
When run under nohup bash prints that SIGHUP is ignored (empty string): $ rm -f nohup.out; nohup bash -c 'trap -p'; cat nohup.out sending output to nohup.out trap -- '' SIGHUP But sh prints that SIGHUP has the default disposition: $ rm -f nohup.out; nohup sh -c 'trap -p'; cat nohup.out