Bug#758969: bash: "! true &" sets $? to 1

2024-03-24 Thread Vincent Lefevre
Hi,

On 2024-03-24 00:57:26 +0100, Gioele Barabucci wrote:
> this issue does not seem to affect version 5.0-6 and later of bash.
> 
> $ ! true &
> [1] 2264193
> [1]+  Donetrue
> $ echo $?
> 0
> 
> Please reopen this bug if you can still reproduce this issue.

I confirm that this is now correct. Moreover, in the
/usr/share/doc/bash/changelog.gz file:

  This document details the changes between this version, bash-4.4-alpha, and
  the previous version, bash-4.3-release.
  [...]
  jj. Asynchronous commands now always set $? to 0 and are not affected by
  whether or not the command's exit status is being inverted.

which corresponds to this bug (I had reported the bug upstream,
see the "Forwarded" URL, and it got fixed at that time).

So it was fixed in bash 4.4.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Bug#758969: bash: "! true &" sets $? to 1

2014-08-23 Thread Vincent Lefevre
Package: bash
Version: 4.3-9
Severity: normal

With bash:

vinc17@xvii:~$ ! true &
[1] 15171
vinc17@xvii:~$ echo $?
1
[1]+  Donetrue

while POSIX says:

  The exit status of an asynchronous list shall be zero.

in 
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_03_02

Other shells (dash, ksh93, mksh, zsh) behave correctly.

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.11-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bash depends on:
ii  base-files   7.5
ii  dash 0.5.7-4
ii  debianutils  4.4
ii  libc62.19-9
ii  libncurses5  5.9+20140712-2
ii  libtinfo55.9+20140712-2

Versions of packages bash recommends:
ii  bash-completion  1:2.1-4

Versions of packages bash suggests:
pn  bash-doc  

-- debconf-show failed


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org