Local variable can not unset within shell functions

2024-07-11 Thread Dr. Werner Fink
Hi, I've a report that with later bash the following which works in bash-4.2 x () { local x=y declare -p x echo $x unset x declare -p x echo $x } with linux-40cm:~ # x () { > local x=y > declare -p x > echo $x > unset x > declare -p x > echo $x > } linux-40cm

Re: [bug-bash] Bash-5.2 Patch 22

2024-01-16 Thread Dr. Werner Fink
On 2024/01/16 09:27:19 -0500, Chet Ramey wrote: > On 1/16/24 4:00 AM, Dr. Werner Fink wrote: > > > what is with the readline82-008, readline82-009, and readline82-010 > > patches? > > What about them? Should those be part also of trhe bash52 patches as well? -- &quo

Re: [bug-bash] Bash-5.2 Patch 22

2024-01-16 Thread Dr. Werner Fink
On 2024/01/14 13:34:06 -0500, Chet Ramey wrote: >BASH PATCH REPORT >= > > Bash-Release: 5.2 > Patch-ID: bash52-022 > > Bug-Reported-by: srobert...@peratonlabs.com > Bug-Reference-ID: > Bug-Reference-URL: > https:

Re: [bug-bash] segfault in for(()) loop

2023-07-25 Thread Dr. Werner Fink
On 2023/07/24 13:16:23 -0400, Chet Ramey wrote: > On 7/24/23 11:58 AM, vc--- via Bug reports for the GNU Bourne Again SHell > wrote: > > > Bash Version: 5.2 > > Patch Level: 15 > > Release Status: release > > > > Description: > > Segmentation fault in 'for ((...))' loop > > > > Repeat-By: >

Extrem memory consumption during unicode test with alt-array implementation

2022-10-06 Thread Dr. Werner Fink
Hi, Just to mention due to the extrem memory consumption during unicode tests with enabled altenative array implementation the speed win is more then equalised. That is the build system becomes unusable ps aux | grep -E 'USER|^399' USER PID %CPU %MEMVSZ RSS TTY STAT START TIM

Re: New feature in bash 5.1/readline-8.1 rc1 breaks python-pexpect

2020-10-28 Thread Dr. Werner Fink
On 2020/10/28 10:23:57 -0400, Chet Ramey wrote: > On 10/16/20 9:28 AM, Chet Ramey wrote: > > On 10/16/20 9:16 AM, Dr. Werner Fink wrote: > > > >> Also a warning hint in the manual page could > >> help users before enabling this feature :) > > > > I a

Re: New feature in bash 5.1/readline-8.1 rc1 breaks python-pexpect

2020-10-16 Thread Dr. Werner Fink
On 2020/10/16 09:03:53 -0400, Chet Ramey wrote: > On 10/16/20 5:41 AM, Dr. Werner Fink wrote: > > Hi, > > > > after build rc1 of bash 5.1 as well as readline-8.1 I've set up test > > staging process. During build the package python-pexpect throws e

New feature in bash 5.1/readline-8.1 rc1 breaks python-pexpect

2020-10-16 Thread Dr. Werner Fink
Hi, after build rc1 of bash 5.1 as well as readline-8.1 I've set up test staging process. During build the package python-pexpect throws errors in its test suite, e.g. [ 260s] self = [ 260s] [ 260s] def test_async_replwrap_multiline(self): [ 260s] bash = replwrap.bash() [ 260s

Re: [bug-bash] Unexpected sourcing of ~/.bashrc under ssh

2019-10-28 Thread Dr. Werner Fink
On 2019/10/24 10:47:52 -0400, Greg Wooledge wrote: > On Thu, Oct 24, 2019 at 09:01:07AM +0200, francis.montag...@inria.fr wrote: > > When logged on a machine with ssh, executing a simple command CMD1 > > that spawn a "/bin/bash -c some other command" do not source > > ~/.bashrc: normal behavi

Re: Hidden directories breaks path expansions

2019-03-11 Thread Dr. Werner Fink
On Fri, Mar 08, 2019 at 09:53:39AM -0500, Chet Ramey wrote: > On 3/7/19 9:42 AM, Dr. Werner Fink wrote: > > >> There is a slightly updated version of that patch attached to this message. > > > > OK ... the hidden directories do work now ... but in the test suite >

Re: [bug-bash] Hidden directories breaks path expansions

2019-03-07 Thread Dr. Werner Fink
On Thu, Mar 07, 2019 at 03:42:49PM +0100, Dr. Werner Fink wrote: > On Mon, Mar 04, 2019 at 09:00:38AM -0500, Chet Ramey wrote: > > On 3/4/19 8:19 AM, wer...@suse.de wrote: > > > > > Bash Version: 5.0 > > > Patch Level: 2 > > > Release Status: release >

Re: Hidden directories breaks path expansions

2019-03-07 Thread Dr. Werner Fink
On Mon, Mar 04, 2019 at 09:00:38AM -0500, Chet Ramey wrote: > On 3/4/19 8:19 AM, wer...@suse.de wrote: > > > Bash Version: 5.0 > > Patch Level: 2 > > Release Status: release > > > > Description: > > Since patch bash50-001 there is a regession on path expansion. > > The script example

Re: [bug-bash] Bash-5.0-beta2 available for download

2018-11-30 Thread Dr. Werner Fink
On Thu, Nov 29, 2018 at 08:52:58AM -0800, Chet Ramey wrote: > On 11/29/18 7:09 AM, Dr. Werner Fink wrote: > > On Tue, Nov 27, 2018 at 01:24:38PM -0500, Chet Ramey wrote: > >> The second beta release of bash-5.0 is now available with the URL > >> > >> ftp://

Re: [bug-bash] Bash-5.0-beta2 available for download

2018-11-29 Thread Dr. Werner Fink
On Tue, Nov 27, 2018 at 01:24:38PM -0500, Chet Ramey wrote: > The second beta release of bash-5.0 is now available with the URL > > ftp://ftp.cwru.edu/pub/bash/bash-5.0-beta2.tar.gz > I see this [ 2709s] seq.c: In function 'long_double_format': [ 2709s] seq.c:166:9: error: expected ';' before 'r

Re: [bug-bash] Which commit for a bug in 4.3.48 which is fixed in 4.4.23

2018-09-25 Thread Dr. Werner Fink
On Mon, Sep 24, 2018 at 01:52:54PM -0400, Chet Ramey wrote: > On 9/24/18 1:50 PM, Eduardo Bustamante wrote: > > On Mon, Sep 24, 2018 at 4:09 AM Dr. Werner Fink wrote: > > (...) > >> Reconstructed the attached patch ... seems to work > > > > Out of curiosity,

Re: [bug-bash] Which commit for a bug in 4.3.48 which is fixed in 4.4.23

2018-09-24 Thread Dr. Werner Fink
On Fri, Sep 21, 2018 at 01:11:38PM +0200, Dr. Werner Fink wrote: > Hi, > > with 4.3.48 the line > > T="";echo ">${T//*/ }<" > > leads to > > >< > > but with 4.4.23 the correct result is given back > >

Which commit for a bug in 4.3.48 which is fixed in 4.4.23

2018-09-21 Thread Dr. Werner Fink
Hi, with 4.3.48 the line T="";echo ">${T//*/ }<" leads to >< but with 4.4.23 the correct result is given back > < in the git repro I do not find any useful login entry for this Werner -- "Having a smoking section in a restaurant is like having a peeing section in a swimm

Re: Syntax error near unexpected token `newline' within loops

2017-04-24 Thread Dr. Werner Fink
On Mon, Apr 24, 2017 at 08:44:11AM -0400, Greg Wooledge wrote: > On Mon, Apr 24, 2017 at 12:59:01PM +0200, wer...@suse.de wrote: > > V_NAME=Friday > > for (( INDEX=0; INDEX<$((10-$(expr length $V_NAME))); INDEX++ )) > > The outer (( )) in the C-style for loop already create an arithmetic >

Re: Syntax error near unexpected token `newline' within loops

2017-04-24 Thread Dr. Werner Fink
On Mon, Apr 24, 2017 at 02:25:41PM +0300, Pierre Gaston wrote: > On Mon, Apr 24, 2017 at 1:59 PM, wrote: > > > (...) > > > > and yes > > > > V_NAME=Friday > > for (( INDEX=0; INDEX<$((10-${#V_NAME})) ; INDEX++ )) > > do > > echo $INDEX > > done > > > >

Re: The lastpipe shell option even with job control?

2017-03-28 Thread Dr. Werner Fink
On Tue, Mar 28, 2017 at 10:17:54AM -0400, Chet Ramey wrote: > On 3/27/17 9:44 AM, Dr. Werner Fink wrote: > > Hi, > > > > I'd like to ask if there is crucial reason, beside the correct foreground > > process group, not to allow the lastpipe shell option for an inter

The lastpipe shell option even with job control?

2017-03-27 Thread Dr. Werner Fink
Hi, I'd like to ask if there is crucial reason, beside the correct foreground process group, not to allow the lastpipe shell option for an interactive bash? Maybe something like in the attachment could be an option? Werner -- "Having a smoking section in a restaurant is like having

The trap EXIT not allways executed

2016-11-07 Thread Dr. Werner Fink
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc -I/home/abuild/rpmbuild/BUILD/bash-4.4 -L/home/abuild/rpmbuild/BUILD/bash-4.4/../readline-7.0 Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -D

Trap does not work if a subshell wait(s) for job

2015-02-18 Thread Dr. Werner Fink
Hi, found due to a hang in the test suite of gnutls, after debugging I've extract the example code launch_server () { sleep 100 & l=$!; trap "kill -15 $l" 15; echo $l; wait $l; } launch_server & x=$! sleep 2 kill $x which does wait the full 100 seconds with bash 4.3 but with

Re: [bug-bash] Named fifo's causing hanging bash scripts

2015-01-16 Thread Dr. Werner Fink
On Fri, Jan 16, 2015 at 10:46:02AM -0500, Chet Ramey wrote: > >> > >> What do ps and gdb tell you about pid 19175 (and the corresponding pid in > >> the call to waitchld in the other traceback)? Running, terminated, reaped, > >> other? > > > > d136:~ # ps 10942 > > PID TTY STAT TIME

Re: [bug-bash] Named fifo's causing hanging bash scripts

2015-01-16 Thread Dr. Werner Fink
On Fri, Jan 16, 2015 at 09:22:36AM -0500, Chet Ramey wrote: > On 1/13/15 4:29 AM, Dr. Werner Fink wrote: > > >>> Bash Version: 4.3 > >>> Patch Level: 33 > >>> Release Status: release > >>> > >>> Description: > >>>

Re: Named fifo's causing hanging bash scripts

2015-01-16 Thread Dr. Werner Fink
On Fri, Jan 16, 2015 at 09:09:25AM -0500, Chet Ramey wrote: > On 1/12/15 9:55 AM, wer...@linux-8jdz.site wrote: > > > Bash Version: 4.3 > > Patch Level: 33 > > Release Status: release > > > > Description: > > Named fifo's causing hanging bash scripts like > > > > while IFS="|" re

Re: [bug-bash] Named fifo's causing hanging bash scripts

2015-01-13 Thread Dr. Werner Fink
On Mon, Jan 12, 2015 at 11:50:56AM -0500, Chet Ramey wrote: > On 1/12/15 9:55 AM, wer...@linux-8jdz.site wrote: > > Configuration Information [Automatically generated, do not change]: > > Machine: x86_64 > > OS: linux-gnu > > Compiler: gcc -I/home/abuild/rpmbuild/BUILD/bash-4.3 > > -L/home/abuild/

Re: [bug-bash] Troublesome checkwinsize (none) behaviour

2013-07-15 Thread Dr. Werner Fink
On Sat, Jul 13, 2013 at 02:52:07AM -0700, Linda Walsh wrote: > Not even putting an underscore in front or back of it. 'path' is a > not an uncommon name for shell scripts to use. > > Also, I assume you know that suse scripts export COLUMNS in places > like /etc/profile, /etc/csh.login and /etc/k

Warning: the patch for xdupmbstowcs2 to avoid loops breaks expansion

2011-03-22 Thread Dr. Werner Fink
Hi, just to be noted, tha patch: - *** ../bash-4.2-patched/lib/glob/xmbsrtowcs.c 2010-05-30 18:36:27.0 -0400 --- lib/glob/xmbsrtowcs.c 2011-03-14 14:22:11.0 -0400 *** *** 174,180 wcsl

Re: [bash-bug] no local bash_history created or written to if existing (~/.bash_history

2011-03-09 Thread Dr. Werner Fink
On Tue, Mar 08, 2011 at 09:40:26PM -0500, Chet Ramey wrote: > On 3/8/11 11:12 AM, Chet Ramey wrote: > > > I might be able to finesse this particular case based on the state that > > readline exports to the calling application. > > I think I was able to do that. Try the attached patch; it works

Re: [bash-bug] no local bash_history created or written to if existing (~/.bash_history

2011-03-08 Thread Dr. Werner Fink
On Tue, Mar 08, 2011 at 12:02:53PM -0500, Chet Ramey wrote: > > > > Does this mean that the attached patch could also not work > > on some systems? Or does this interfere with the readline > > library? > > Since longjmp is not on the list of functions that is safe to call > from a signal handler,

Re: [bash-bug] no local bash_history created or written to if existing (~/.bash_history

2011-03-08 Thread Dr. Werner Fink
On Tue, Mar 08, 2011 at 11:19:25AM -0500, Chet Ramey wrote: > On 3/8/11 5:29 AM, Dr. Werner Fink wrote: > > >> One thing that has changed is that an interactive shell will no longer > >> attempt to write the history file if it's killed by a signal, since that >

Re: [bash-bug] no local bash_history created or written to if existing (~/.bash_history

2011-03-08 Thread Dr. Werner Fink
On Tue, Mar 08, 2011 at 03:07:13PM +0100, Roman Rakus wrote: > On 03/08/2011 12:32 PM, Dr. Werner Fink wrote: > >Something like the attached patch. > > > Seems it doesn't work. I have applied your patch, run that bash in > gnome-terminal, close the terminal. In gdb I set

Re: [bash-bug] no local bash_history created or written to if existing (~/.bash_history

2011-03-08 Thread Dr. Werner Fink
On Tue, Mar 08, 2011 at 11:29:22AM +0100, Werner Fink wrote: > On Mon, Mar 07, 2011 at 10:22:55PM -0500, Chet Ramey wrote: > > > > One thing that has changed is that an interactive shell will no longer > > attempt to write the history file if it's killed by a signal, since that > > causes many fun

Re: [bash-bug] no local bash_history created or written to if existing (~/.bash_history

2011-03-08 Thread Dr. Werner Fink
On Mon, Mar 07, 2011 at 10:22:55PM -0500, Chet Ramey wrote: > On 3/6/11 2:53 PM, Doug McMahon wrote: > > with the current bash used in ubuntu 11.04 there no longer is a > > ~/.bash_history created > > If there is an existing ~/.bash_history in place or one is inadvertently > > created, *see below,

Re: [bash-bug] Fix testsuite errors due to shell quoted parameter expansion issue.

2010-08-17 Thread Dr. Werner Fink
On Tue, Aug 03, 2010 at 02:55:36PM -0600, Eric Blake wrote: > > And meanwhile, I found a ksh93 parsing bug (don't know where to report > that): > > $ ksh -c 'a(){ echo hi; }; a' > ksh: syntax error at line 1: `}' unexpected > $ ksh -c 'a() { echo hi; }; a' > hi > $ bash -c 'a(){ echo hi; }; a' >

Re: [bash-bug] [bash-bug] PIPESTATUS always returns only a single element

2010-08-16 Thread Dr. Werner Fink
On Fri, Aug 13, 2010 at 12:18:23PM +0200, Werner Fink wrote: > On Thu, Aug 12, 2010 at 05:37:55PM -0500, lstee...@gmail.com wrote: > > #!/bin/bash > > # > > # A script to test PIPESTATUS and pipefail > > # > > echo " cmd: set +o pipefail" > > echo " pipe: ps -ef 2>&1 | grep "^\$USR" >/dev/null"

Re: [bash-bug] PIPESTATUS always returns only a single element

2010-08-13 Thread Dr. Werner Fink
On Thu, Aug 12, 2010 at 05:37:55PM -0500, lstee...@gmail.com wrote: > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc -I/usr/src/packages/BUILD/bash-4.1 > -L/usr/src/packages/BUILD/bash-4.1/../readline-6.1 > Compilation CFLAGS:

Re: [bash-bug] parsing error with heredoc and command substitution

2010-07-15 Thread Dr. Werner Fink
On Tue, Jul 13, 2010 at 01:51:31PM -0400, Alex Khesin wrote: > Configuration Information: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' > -DCONF_VENDOR='pc' -DLOCAL

Re: [bash-bug] A note for read builtin

2010-06-25 Thread Dr. Werner Fink
On Thu, Jun 24, 2010 at 01:18:25PM -0400, Chet Ramey wrote: > On 6/23/10 6:08 AM, Dr. Werner Fink wrote: > > > Yet an other version of the patch to avoid trouble with the > > coproc builtin tested out in tests/coproc.tests. There is one > > difference more with tests/re

Re: [bash-bug] A note for read builtin

2010-06-24 Thread Dr. Werner Fink
On Wed, Jun 23, 2010 at 12:08:20PM +0200, Werner Fink wrote: > > Yet an other version of the patch to avoid trouble with the > coproc builtin tested out in tests/coproc.tests. There is one > difference more with tests/redir.tests at > > exit 3 | $EXIT > $TMPDIR/null-redir-e > echo $? -- ${pi

Re: [bash-bug] A note for read builtin

2010-06-23 Thread Dr. Werner Fink
On Wed, Jun 23, 2010 at 10:00:12AM +0200, Werner Fink wrote: > On Tue, Jun 22, 2010 at 04:50:54PM -0400, Chet Ramey wrote: > > On 6/18/10 10:05 AM, Dr. Werner Fink wrote: > > > > > as now is visible the last command in the pipe sequence done > > > in the bash is

Re: A note for read builtin

2010-06-23 Thread Dr. Werner Fink
On Tue, Jun 22, 2010 at 04:50:54PM -0400, Chet Ramey wrote: > On 6/18/10 10:05 AM, Dr. Werner Fink wrote: > > > as now is visible the last command in the pipe sequence done > > in the bash is a real sub process whereas in the ksh it is not. > > > > The question rise

A note for read builtin

2010-06-18 Thread Dr. Werner Fink
Just a remark about the sub shell usage in bash in comparision to ksh. Let's try: strace -f -o bash.strace bash -c 'echo a b | read a b' and grep about execve, clone, write on stdout, read from stdin: > grep -E 'execve|clone|write\(1|read\(0' bash.strace 17183 execve("/bin/bash", ["

Re: [bash-bug] Can arithmetic evaluation trap more than just division by zero?

2010-04-06 Thread Dr. Werner Fink
On Tue, Apr 06, 2010 at 08:35:13AM -0400, Greg Wooledge wrote: > On Tue, Apr 06, 2010 at 02:21:05PM +0200, Roman Rakus wrote: > > >>$((2 ** 63 / -1)) > > > I can reproduce it in 4.1.2(1)-release and 4.0.23(1)-release on x86_64 > > GNU/Linux. I didn't try on bash 3.2. > > cyclops:~$ uname -a; ech

Re: [bash-bug] Crash on completion

2010-03-09 Thread Dr. Werner Fink
On Tue, Mar 09, 2010 at 02:51:18PM +0100, Roman Rakus wrote: > > The bash segfaults on the line `while (val = > glob_matches[local_index++])', because glob_matches is pointer to > NULL. I have add the check for this null. But this is most likely > not the right patch. > RR > diff -up bash-4.1/bash

Re: [bash-bug] bash accepts script with incorrect syntax and goes into infinite loop

2009-10-09 Thread Dr. Werner Fink
On Fri, Oct 09, 2009 at 11:46:16AM +0100, Dave B wrote: > On Friday 09 October 2009, Pierre Gaston wrote: > > Uhm, on a more accurate reading you're probably right. The POSIX syntax for > while is > > while compound-list-1 do > compound-list-2 > done > > And "read NAME; echo NAME=$NAME" is

Bash loadable plugins ... minimal header file?

2009-05-28 Thread Dr. Werner Fink
Hi, AFAICS from examples/loadables/ a lot of headers are readed by the compiler which requires - beside the bash and the readline library - an further package (rpm/deb) bash-devel for including all those headers ... beside this the Makefiles do not install any of them. Therefore my question: how

Re: [bash-bug] contents of whole arrays dissapears leaving while read loop

2009-03-26 Thread Dr. Werner Fink
On Thu, Mar 26, 2009 at 10:38:20AM +0100, Jan Schampera wrote: > Lennart Schultz wrote: > > > In the construct > > cat file|while read line > > do > > done > > the content of any arry assignments in the loop dissapears leaving the loop: > > This is logic, since every part of the pipe runs in an o

bash $'foo' quoting problem

2006-02-24 Thread Dr. Werner Fink
Hi, the bash-3.1.5 has a problem with quoting which leads to a different output of echo $(set -- $'a b'; echo $#) and echo "$(set -- $'a b'; echo $#)" The patch below fix this problem. Werner *