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 [./
Konstantin,
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 (Cor
As you decide.
Debian (working), subshell syscall trace on receiving sigterm:
| $ strace -p 1436
| strace: Process 1436 attached
| wait4(-1, 0x7ffd49d66b90, 0, NULL) = ? ERESTARTSYS (To be restarted if
SA_RESTART is set)
| --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=1461, si_uid
On 3/26/19 12:44 PM, Konstantin Andreev wrote:
> bash-5.0.3, - is it what is marked [Bash-5.0 patch 3: improve...] in bash.git?
> Just built and tested it. The systems are x86-64.
>
> + Debian GNU/Linux buster/sid (pre-10): works (both exit traps are invoked)
> (runs in virtual machine)
>
btw, I can undertake some debugging, but I have no time to investigate how the
bash code works.
If you may provide me with enough details so that I would know where to look
into the control flow, I would investigate what's happening.
Regards, Konstantin
Konstantin Andreev, 26 Mar 2019 19:44 M
bash-5.0.3, - is it what is marked [Bash-5.0 patch 3: improve...] in bash.git?
Just built and tested it. The systems are x86-64.
+ Debian GNU/Linux buster/sid (pre-10): works (both exit traps are invoked)
(runs in virtual machine)
kernel-4.18.0-3-amd64, glibc-2.28-6
- CentOS Linux 7.2.15
On Mon, Mar 25, 2019 at 6:24 PM Konstantin Andreev wrote:
> 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)
Dou
On 3/25/19 3:48 PM, Konstantin Andreev wrote:
> Consider the simple `ssxtrap' script:
>
> | #!/bin/bash
> |
> | echo ext pid=$BASHPID
> | # trap 'echo "ext exit trap in $BASHPID"' EXIT
> |
> | (echo int pid=$BASHPID
> | trap 'echo "int exit trap in $BASHPID"' EXIT
> | sleep 9) &
> |
> | wait
Consider the simple `ssxtrap' script:
| #!/bin/bash
|
| echo ext pid=$BASHPID
| # trap 'echo "ext exit trap in $BASHPID"' EXIT
|
| (echo int pid=$BASHPID
| trap 'echo "int exit trap in $BASHPID"' EXIT
| sleep 9) &
|
| wait
| echo "subshell done"
Let's run it:
Terminal A