Automatically assigning BASH_XTRACEFD while redirecting doesn't make it a special variable.

2012-09-05 Thread Pierre Gaston
It seems BASH_XTRACEFD becomes special only if you assign it normally but not if you do: exec {BASH_XTRACEFD}>file Not a real major problem and I don't use it everyday, but the statement looks so nice :D

Re: Automatically assigning BASH_XTRACEFD while redirecting doesn't make it a special variable.

2012-09-05 Thread Chet Ramey
On 9/5/12 8:05 AM, Pierre Gaston wrote: > It seems BASH_XTRACEFD becomes special only if you assign it normally > but not if you do: > > exec {BASH_XTRACEFD}>file > > Not a real major problem and I don't use it everyday, but the > statement looks so nice :D This is a great idea. I'll add it for

Re: AIX and Interix also do early PID recycling.

2012-09-05 Thread Chet Ramey
On 8/28/12 3:21 AM, Roman Rakus wrote: > The attached patch adds ability to set forced number of remembered > statuses, easily during configure time, example: > ./configure --enable-fixedjsmax=2048 > It will force bash to remember 2048 statuses, independently on childmax value. > Patch should cle

Some issues with short-circuiting arithmetic operators

2012-09-05 Thread Dan Douglas
This reorder function is meant to swap values of a two-element array if unordered. Bash and ksh produce reversed results. mksh and zsh do as expected. #!/usr/bin/env bash [[ -n ${ZSH_VERSION+_} ]] && emulate ksh function reorder { (( x[1] < x && (x=x[1], x[1]=$x) )) e