Package: bash
Version: 5.2.15-2+b13
Followup-For: Bug #1078107

Dear Maintainer,

I confirm that Bug #1078107 still affects Debian 12.15 with
bash 5.2.15-2+b13.

What led up to the situation:
I use Bash's `time` reserved word with a parenthesized subshell that
installs INT and TERM traps for signal handling.

What I did:
I ran this minimal reproducer in a clean, non-interactive Bash:

    bash --noprofile --norc -c '
        TIMEFORMAT="elapsed %R seconds"
        time (
            trap ":" INT TERM
            sleep 1
            exit 0
        )
    '

What happened:
The subshell runs for approximately one second and returns exit status 0,
but Bash prints no timing output.

Expected result:
Bash should print one line such as:

    elapsed 1.002 seconds

Removing either `trap ":" INT TERM` or `exit 0` makes the timing output
appear again.

This appears related to the existing reproducer `time (exec echo)` in
this bug: in both cases, an explicitly terminated parenthesized subshell
completes successfully but the Bash `time` reserved word produces no
output.

I reproduced this using a file-based test invoked as:

    bash --noprofile --norc /tmp/bash-time-test.sh

The test has four cases. Only the combination of an INT/TERM trap and
explicit `exit 0` suppresses the TIMEFORMAT output. The same unchanged
test prints timing output for all four cases on SLES 15 SP7 with
Bash 4.4.23.

Regards,
Axel Werner


-- System Information:
Debian Release: 12.15
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable-security'), (500, 
'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-56-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_AUX
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages bash depends on:
ii  base-files   12.4+deb12u15
ii  debianutils  5.7-0.5~deb12u1
ii  libc6        2.36-9+deb12u14
ii  libtinfo6    6.4-4

Versions of packages bash recommends:
ii  bash-completion  1:2.11-6

Versions of packages bash suggests:
pn  bash-doc  <none>

-- no debconf information

Reply via email to