[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[9]: Subshell exit trap is not invoked if shell exit trap also set

From: Konstantin Andreev
Subject: Re[9]: Subshell exit trap is not invoked if shell exit trap also set
Date: Wed, 27 Mar 2019 13:57:15 +0300
User-agent: Mozilla/5.0 (X11; SunOS i86pc; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Al, thank you for your time.

Being under the impression of your experiment, I went back to my setup, looked 
at it thoughtfully for a while, and realized that bash-5.* ... if fact works. 
There was a unfortunate mistake of mine: I launched [ssxtrap] from inside 
interactive bash-5, but ... as [./ssxtrap], literally. My fault, sorry for 

It looks like Dmitry was right, and this bug is fixed since bash-4.4.

Thank all for help.

Regards, Konstantin.

Al Payne, 26 Mar 2019 22:55 MSK:

I also tried to replicate on CentOS (under Fusion), but get the two expected 
trap messages when killing the internal process:

     ext pid=25449
     int pid=25450
     int exit trap in 25450
     subshell done
     ext exit trap in 25449

Test install:
- CentOS Linux release 7.2.1511 (Core) [under VMware Fusion]
- kernel-3.10.0-327.el7.x86_64; glibc 2.17
- GNU bash, version 5.0.3(1)-release

Dmitry Goncharov, 26 Mar 2019 18:58 MSK:

Double check that this reproduces with bash-5.
I was able to reproduce this with bash-4.2 and earlier. This does not reproduce 
for me with bash-4.4 and later.

Konstantin Andreev, 25 Mar 2019 22:48 MSK:

Verified on:
        Solaris 11.3, bash 4.1.17(1)-release (i386-pc-solaris2.11)
        CentOS Linux 7.2.1511, bash 4.2.46(1)-release (x86_64-redhat-linux-gnu)
        CentOS Linux 7.2.1511, bash 5.0.0(1)-release (x86_64-pc-linux-gnu)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]