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

2018-05-20 Thread Andrei Vagin
Hello Chet, Have you had a chance to try this patch? Let me know if you will have any questions. Thanks, Andrei On Thu, May 03, 2018 at 04:29:13PM -0400, Chet Ramey wrote: > On 5/1/18 7:55 PM, Andrei Vagin wrote: > > >> If it's not obvious, I'm trying to determine w

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

2018-05-04 Thread Andrei Vagin
On Thu, May 03, 2018 at 04:29:13PM -0400, Chet Ramey wrote: > On 5/1/18 7:55 PM, Andrei Vagin wrote: > > >> If it's not obvious, I'm trying to determine whether making this change > >> will add any more value than simply exiting (perhaps with a particular >

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

2018-05-01 Thread Andrei Vagin
On Tue, May 01, 2018 at 02:15:17PM -0400, Chet Ramey wrote: > On 5/1/18 12:44 PM, Andrei Vagin wrote: > > On Tue, May 01, 2018 at 10:40:18AM -0400, Chet Ramey wrote: > >> On 4/30/18 6:05 PM, Andrei Vagin wrote: > >>> bash sets a handler for all terminatin

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

2018-05-01 Thread Andrei Vagin
On Tue, May 01, 2018 at 10:40:18AM -0400, Chet Ramey wrote: > On 4/30/18 6:05 PM, Andrei Vagin wrote: > > 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 exp

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

2018-04-30 Thread Andrei Vagin
ot result in a core dump. For other signals, a null pointer is dereferenced to get a core file. Signed-off-by: Andrei Vagin --- shell.h | 1 + sig.c | 49 +++-- 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/shell.h b/shell.h in

Re: bash handles terminate signals incorrectly, when it is run as the init process in a pid namespace

2018-03-26 Thread Andrei Vagin
On Sun, Mar 25, 2018 at 11:40 AM, Chet Ramey wrote: > On 3/23/18 4:34 AM, Andrei Vagin wrote: >> On Thu, Mar 22, 2018 at 6:25 PM, Chet Ramey wrote: >>> On 3/22/18 3:38 PM, Andrei Vagin wrote: >>> >>>> I am thinking how to fix this issue properly. Here ar

Re: bash handles terminate signals incorrectly, when it is run as the init process in a pid namespace

2018-03-23 Thread Andrei Vagin
On Thu, Mar 22, 2018 at 6:25 PM, Chet Ramey wrote: > On 3/22/18 3:38 PM, Andrei Vagin wrote: > >> I am thinking how to fix this issue properly. Here are a few points: >> * bash should know that signals are ignored if a process is the init >> process in a pid namespace. >

bash handles terminate signals incorrectly, when it is run as the init process in a pid namespace

2018-03-22 Thread Andrei Vagin
Hello, Periodically we see bash processes which run in busy loops: $ strace -fp 15264 strace: Process 15264 attached --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} --- rt_sigreturn({mask=[QUIT]}) = 143 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_M