Re: Some incorrect behaviour for BASH arrays

2023-08-30 Thread Lawrence Velázquez
On Wed, Aug 30, 2023, at 2:12 PM, Victor Pasko wrote: > Attached please find bug.bash to reproduce incorrect BASH behaviour for > BASH arrays > and look at ways to run it Your tests are flawed. The lines you use to inspect RESULT... > badsed() { # just array indexes are used for RESULT > ... >

Some incorrect behaviour for BASH arrays

2023-08-30 Thread Victor Pasko
Hi, On my Win-7 64-bit using Cygwin *% bash --version*GNU bash, version 5.2.15(3)-release (x86_64-pc-cygwin) Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software; you are free to change and redistr

Re: bug attached

2023-08-30 Thread Andreas Kusalananda Kähäri
On Wed, Aug 30, 2023 at 03:40:21PM +0300, queency3 jones wrote: > > From: queen...@gmail.com > To: bug-bash@gnu.org > Subject: 2 same var name in different function causing mix > > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: g

Re: bug attached

2023-08-30 Thread Chet Ramey
On 8/30/23 8:40 AM, queency3 jones wrote: > Bash Version: 5.0 > Patch Level: 3 > Release Status: release > > Description: > > function sub { aa=8;return_value=$aa; } > function sub { aa=8; } > > function main { aa=3;sub;aa=$(($aa+1));printf "$aa\n"; } > > > calling main will print 9 instead of 4

bug attached

2023-08-30 Thread queency3 jones
From: queen...@gmail.com To: bug-bash@gnu.org Subject: 2 same var name in different function causing mix Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fdebug-prefix-map=/build/bash-2bxm7h/bash-5.0=. -fs

Re: give_terminal_to() / maybe_give_terminal_to() race

2023-08-30 Thread Chet Ramey
On 8/25/23 9:38 PM, Earl Chew wrote: A newly created process of a foreground job races the parent shell to configure the controlling terminal. This can result in the parent shell stealing the controlling terminal from a grandchild, and giving it to the child. I think stop_pipeline() needs to be

Re: [PATCH] Use SIGCONT to avoid fg tcsetpgrp() SIGTTIN/SIGTTOU race

2023-08-30 Thread Earl Chew
> I applied a fix for that on 7/24 and it's in devel branch commit Oh ... I hadn't realised you had already applied a fix. Thanks. Earl

Re: test -v difference between bash 5.1 and 5.2

2023-08-30 Thread Christian Schneider
Hi all, thx for your answers. TBH, I couldn't follow all your explanations, but the gist, is, that it's intentional and not a bug. We will use the ${#foo[@]} > 0 test, that is probably the right in our situation. Background is, the test is in shared code, and we are doing some sanity checks on t