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.

Why should it know this? It's not documented, not portable, and conflicts
with the way signals are documented to behave. This is a situation-specific
problem.

> * user and kernel signals (SEGV, SIGFPE, SIGBUS, etc) are handled differently

Fatal signals (signals whose default disposition is to exit the process)
are pretty much handled identically.

> * bash should not return back from termsig_sighandler(), if it has
> sent a signal to itself.

That suggests that the easiest way to solve the problem is to add a call
to exit() after the kill().

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to