Re: [Help-bash] make function local

2015-04-13 Thread Greg Wooledge
On Sat, Apr 11, 2015 at 01:27:53PM -0400, Chet Ramey wrote: > On 4/10/15 11:09 AM, Greg Wooledge wrote: > > - Fix the $"..." security hole (I tried and failed). > > http://www.gnu.org/software/gettext/manual/html_node/bash.html > > Yeah, I didn't like the all-or-nothing choice the patch implemen

bash crashes on command substitution

2015-04-13 Thread Yuri
On FreeBSD, I have this command line (1). When I move cursor right after 'tmp', press and , it turns into (2)! What happened? The problem is completely reproducible. bash-4.3.33 Yuri --- (1) begin with this--- [root@yuri /usr/local/etc/rc.d]# [ "$(procstat $(cat /var/tmp/tor.pid)" ] --- (2

Re: bash crashes on command substitution

2015-04-13 Thread Eduardo A . Bustamante López
Did you build bash yourself? You need bison when compiling it, and make sure to run a: make distclean before building. I also found this issue while building for openbsd/freebsd, but this is due to some problem in the files included with the bash distribution that have to be regenerated specifical

Re: bash crashes on command substitution

2015-04-13 Thread Chet Ramey
On 4/13/15 12:30 AM, Yuri wrote: > On FreeBSD, I have this command line (1). When I move cursor right after > 'tmp', press and , it turns into (2)! > What happened? > The problem is completely reproducible. http://lists.gnu.org/archive/html/bug-bash/2015-03/msg00037.html -- ``The lyf so short,

Re: [Help-bash] make function local

2015-04-13 Thread Chet Ramey
On 4/13/15 8:33 AM, Greg Wooledge wrote: > On Sat, Apr 11, 2015 at 01:27:53PM -0400, Chet Ramey wrote: >> On 4/10/15 11:09 AM, Greg Wooledge wrote: >>> - Fix the $"..." security hole (I tried and failed). >>> http://www.gnu.org/software/gettext/manual/html_node/bash.html >> >> Yeah, I didn't like

Re: [Help-bash] make function local

2015-04-13 Thread Chet Ramey
On 4/12/15 5:56 PM, Eduardo A. Bustamante López wrote: > Yes. I've been using gprof to study the code paths of some basic functions, > and > it seems like it spends quite some time in the find_variable() and related > functions (IIRC, there was an mt_hash or something function taking up some > pr

Re: bash crashes on command substitution

2015-04-13 Thread Yuri
On 04/13/2015 05:54, Eduardo A. Bustamante López wrote: Did you build bash yourself? You need bison when compiling it, and make sure to run a: make distclean before building. I also found this issue while building for openbsd/freebsd, but this is due to some problem in the files included with th

Re: bash crashes on command substitution

2015-04-13 Thread Eduardo A . Bustamante López
> It is from FreeBSD ports. Everyone has the same bash there. > make distclean etc is all made in a standard way. > Are you saying that the ports build is broken? > > Yuri > Hello Yuri. See Chet's response. That's the actual issue. My response was a "best effort" attempt at helping, but I ended

Only store revealed pids in bgpids data structure

2015-04-13 Thread John Fremlin
Bash instances running in loops get slower over time, as the bgpids data structure grows. Here is a small patch to alleviate one issue :) The jobs.c:bgpids data structure is used as a cache for the wait syscall, to store the status of dead processes, so that scripts can wait on pids even multip