[PATCH] A terminating signal has to complete a bash process

2018-04-30 Thread Andrei Vagin
bash sets a handler for all terminating signals, which saves history, executes traps, sets a default signal handler and re-sends the same signal to itself. It expects that this signal will kill it. Unfortunately it doesn't work in Linux, when a bash script is executed as an init process in a pid n

Re: [BUG] persistently assigned variable cannot be unexported in POSIX mode

2018-04-30 Thread Martijn Dekker
Op 30-04-18 om 21:12 schreef Chet Ramey: 2. The bug is: 'declare +x' a.k.a. 'typeset +x' then fails to unexport the variable in the second version above. The variable remains exported past 'typeset +x foo', as proven by grepping the output of 'env'. Now you've just created a local variable (type

Re: [BUG] persistently assigned variable cannot be unexported in POSIX mode

2018-04-30 Thread Chet Ramey
On 4/30/18 2:57 PM, Martijn Dekker wrote: > Op 27-04-18 om 22:16 schreef Chet Ramey: >> On 4/25/18 10:51 PM, Martijn Dekker wrote: >> >>> What I'm reporting here is a bug I discovered with unexporting a variable >>> that is so exported while bash is in POSIX mode. It cannot be unexported >>> using

Re: [BUG] persistently assigned variable cannot be unexported in POSIX mode

2018-04-30 Thread Martijn Dekker
Op 27-04-18 om 22:16 schreef Chet Ramey: On 4/25/18 10:51 PM, Martijn Dekker wrote: What I'm reporting here is a bug I discovered with unexporting a variable that is so exported while bash is in POSIX mode. It cannot be unexported using 'typeset +x' if you try to do that in a shell function. T