Re: Bash-4.1-rc1 available for FTP

2009-12-26 Thread Chet Ramey


On Dec 26, 2009, at 2:26 PM, Andreas Schwab   
wrote:



I see that quite often in some more complicated shell scripts, with
increasing values for js.c_reaped.  It may have to do with the use of
process substitution.


Yes, those do not end up in the jobs table.

Chet

Sent from my iPhone




Re: Bash-4.1-rc1 available for FTP

2009-12-26 Thread Andreas Schwab
Chet Ramey  writes:

> On Dec 25, 2009, at 11:43 AM, Andreas Schwab 
> wrote:
>
>> What does that mean?
>>
>
> TRACE: pid 17502: mark_dead_jobs_as_notified: ndeadproc (0) != js.c_reaped
> (14)
>
> It's a debugging/informational message.  ndeadproc is a count of the
> number of dead child processes in the current jobs list.  c_reaped is  the
> total number of dead child processes the shell has reaped.  If  they are
> different, I either did not catch some reaped children, we  have dead
> children that were not part of jobs, or we've walked the  list before.

I see that quite often in some more complicated shell scripts, with
increasing values for js.c_reaped.  It may have to do with the use of
process substitution.

Andreas.

-- 
Andreas Schwab, [email protected]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Re: Bash-4.1-rc1 available for FTP

2009-12-26 Thread Chet Ramey
On Dec 25, 2009, at 11:43 AM, Andreas Schwab   
wrote:



What does that mean?



TRACE: pid 17502: mark_dead_jobs_as_notified: ndeadproc (0) !=  
js.c_reaped (14)


It's a debugging/informational message.  ndeadproc is a count of the  
number of dead child processes in the current jobs list.  c_reaped is  
the total number of dead child processes the shell has reaped.  If  
they are different, I either did not catch some reaped children, we  
have dead children that were not part of jobs, or we've walked the  
list before.


That info doesn't get checked in "release" versions of the shell.

Chet

Sent from my iPhone




Re: Bash-4.1-rc1 available for FTP

2009-12-25 Thread Andreas Schwab
What does that mean?

TRACE: pid 17502: mark_dead_jobs_as_notified: ndeadproc (0) != js.c_reaped (14)

Andreas.

-- 
Andreas Schwab, [email protected]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Re: Bash-4.1-rc1 available for FTP

2009-12-22 Thread Chet Ramey
On 12/22/09 4:28 PM, Mike Frysinger wrote:
> On Tuesday 22 December 2009 16:16:51 Chet Ramey wrote:
>> On 12/22/09 2:39 PM, Mike Frysinger wrote:
>>> shell.c:1726: warning: implicit declaration of function
>>> ‘initialize_bashopts’
>>
>> Interesting, since initialize_bashopts is declared in builtins/common.h,
>> and shell.c includes that file.
> 
> looks like the common.h has a typo in it ... "intialize..." instead of 
> "initialize" ...

Whoops.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, [email protected]://cnswww.cns.cwru.edu/~chet/




Re: Bash-4.1-rc1 available for FTP

2009-12-22 Thread Mike Frysinger
On Tuesday 22 December 2009 16:16:51 Chet Ramey wrote:
> On 12/22/09 2:39 PM, Mike Frysinger wrote:
> > shell.c:1726: warning: implicit declaration of function
> > ‘initialize_bashopts’
> 
> Interesting, since initialize_bashopts is declared in builtins/common.h,
> and shell.c includes that file.

looks like the common.h has a typo in it ... "intialize..." instead of 
"initialize" ...
-mike


signature.asc
Description: This is a digitally signed message part.


Re: Bash-4.1-rc1 available for FTP

2009-12-22 Thread Chet Ramey
On 12/22/09 3:01 PM, Greg Wooledge wrote:
> On Tue, Dec 22, 2009 at 02:23:47PM -0500, Mike Frysinger wrote:
>> On Tuesday 22 December 2009 08:46:14 Chet Ramey wrote:
>>> The first release candidate of bash-4.1 is now available with the URL
>>
>> top level Makefile.in is missing pathnames.h dependency info for 
>> builtins/evalstring.o and builtins/eval.o.
> 
> On that note, bashhist.o did not correctly rebuild when I changed
> config-top.h either.  I'd bet a lot of other similar relationships
> are not set up, since config-top.h is included through config.h
> rather than directly.

Probably not too many, since there aren't that many tweakable options
in config-top.h.  A brief audit doesn't immediately indicate others.

Chet



-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, [email protected]://cnswww.cns.cwru.edu/~chet/




Re: Bash-4.1-rc1 available for FTP

2009-12-22 Thread Chet Ramey
On 12/22/09 2:39 PM, Mike Frysinger wrote:
> On Tuesday 22 December 2009 08:46:14 Chet Ramey wrote:
>> The first release candidate of bash-4.1 is now available with the URL
>>
>> ftp://ftp.cwru.edu/pub/bash/bash-4.1-rc1.tar.gz
> 
> also, some implicit decls (some ive posted about in the past):
> 
> redir.c:1029: warning: implicit declaration of function ‘xtrace_fdchk’

Good catch.

> shell.c:1726: warning: implicit declaration of function ‘initialize_bashopts’

Interesting, since initialize_bashopts is declared in builtins/common.h,
and shell.c includes that file.

> ./declare.def:515: warning: implicit declaration of function 
> ‘bind_assoc_variable’

Yep, extern declaration missing.

>   looks like the protos need to be moved to a common header
> 
> snprintf.c:954: warning: implicit declaration of function ‘isinf’
> snprintf.c:954: warning: implicit declaration of function ‘isnan’
>   missing math.h include

Nope.  I'll add local extern declarations based on the HAVE_ISXXX_IN_LIBC
defines.  I don't want to link against the math library.

> fnxform.c:64: warning: implicit declaration of function ‘get_locale_var’
>   needs to include externs.h

Good catch.

> execute_cmd.c:4380: warning: implicit declaration of function ‘fpurge’
>   the file needs to '#define NEED_FPURGE_DECL'

And another.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, [email protected]://cnswww.cns.cwru.edu/~chet/




Re: Bash-4.1-rc1 available for FTP

2009-12-22 Thread Mike Frysinger
On Tuesday 22 December 2009 15:49:17 Chet Ramey wrote:
> On 12/22/09 2:23 PM, Mike Frysinger wrote:
> > lib/sh/Makefile.in is still missing a pathnames.h target (see attached
> > patch).
> 
> It's never caused a problem for me, and I build with gmake -j N on multiple
> platforms.  Odd.

the failure is very rare.  i saw it myself once only because i had a while 
loop that kept doing clean followed by a build, but drilling down showed the 
obvious missing dep.
-mike


signature.asc
Description: This is a digitally signed message part.


Re: Bash-4.1-rc1 available for FTP

2009-12-22 Thread Chet Ramey
On 12/22/09 2:23 PM, Mike Frysinger wrote:
> On Tuesday 22 December 2009 08:46:14 Chet Ramey wrote:
>> The first release candidate of bash-4.1 is now available with the URL
> 
> top level Makefile.in is missing pathnames.h dependency info for 
> builtins/evalstring.o and builtins/eval.o.

Thanks for the catch.

> lib/sh/Makefile.in is still missing a pathnames.h target (see attached patch).

It's never caused a problem for me, and I build with gmake -j N on multiple
platforms.  Odd.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, [email protected]://cnswww.cns.cwru.edu/~chet/




Re: Bash-4.1-rc1 available for FTP

2009-12-22 Thread Chet Ramey
On 12/22/09 1:44 PM, Greg Wooledge wrote:
> On Tue, Dec 22, 2009 at 08:46:14AM -0500, Chet Ramey wrote:
>> The first release candidate of bash-4.1 is now available with the URL
>>
>> ftp://ftp.cwru.edu/pub/bash/bash-4.1-rc1.tar.gz
> 
> The syslog feature (in config-top.h) appears to be enabled by default.
> This is quite shocking

My bad, I left that enabled.  It was not supposed to be enabled in any
public or semi-public bash release.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, [email protected]://cnswww.cns.cwru.edu/~chet/




Re: Bash-4.1-rc1 available for FTP

2009-12-22 Thread Greg Wooledge
On Tue, Dec 22, 2009 at 02:23:47PM -0500, Mike Frysinger wrote:
> On Tuesday 22 December 2009 08:46:14 Chet Ramey wrote:
> > The first release candidate of bash-4.1 is now available with the URL
> 
> top level Makefile.in is missing pathnames.h dependency info for 
> builtins/evalstring.o and builtins/eval.o.

On that note, bashhist.o did not correctly rebuild when I changed
config-top.h either.  I'd bet a lot of other similar relationships
are not set up, since config-top.h is included through config.h
rather than directly.




Re: Bash-4.1-rc1 available for FTP

2009-12-22 Thread Mike Frysinger
On Tuesday 22 December 2009 08:46:14 Chet Ramey wrote:
> The first release candidate of bash-4.1 is now available with the URL

top level Makefile.in is missing pathnames.h dependency info for 
builtins/evalstring.o and builtins/eval.o.

lib/sh/Makefile.in is still missing a pathnames.h target (see attached patch).
-mike
http://bugs.gentoo.org/284633

add missing dep

--- bash-4.0/lib/sh/Makefile.in
+++ bash-4.0/lib/sh/Makefile.in
@@ -136,6 +136,9 @@
 ${BUILD_DIR}/version.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile
 	-( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} version.h )
 
+${BUILD_DIR}/pathnames.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile
+	-( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} pathnames.h )
+
 # rules for losing makes, like SunOS
 casemod.o: casemod.c
 clktck.o: clktck.c


signature.asc
Description: This is a digitally signed message part.


Re: Bash-4.1-rc1 available for FTP

2009-12-22 Thread Mike Frysinger
On Tuesday 22 December 2009 08:46:14 Chet Ramey wrote:
> The first release candidate of bash-4.1 is now available with the URL
> 
> ftp://ftp.cwru.edu/pub/bash/bash-4.1-rc1.tar.gz

also, some implicit decls (some ive posted about in the past):

redir.c:1029: warning: implicit declaration of function ‘xtrace_fdchk’
shell.c:1726: warning: implicit declaration of function ‘initialize_bashopts’
./declare.def:515: warning: implicit declaration of function 
‘bind_assoc_variable’
looks like the protos need to be moved to a common header

snprintf.c:954: warning: implicit declaration of function ‘isinf’
snprintf.c:954: warning: implicit declaration of function ‘isnan’
missing math.h include

fnxform.c:64: warning: implicit declaration of function ‘get_locale_var’
needs to include externs.h

execute_cmd.c:4380: warning: implicit declaration of function ‘fpurge’
the file needs to '#define NEED_FPURGE_DECL'

-mike


signature.asc
Description: This is a digitally signed message part.


Re: Bash-4.1-rc1 available for FTP

2009-12-22 Thread Greg Wooledge
On Tue, Dec 22, 2009 at 08:46:14AM -0500, Chet Ramey wrote:
> The first release candidate of bash-4.1 is now available with the URL
> 
> ftp://ftp.cwru.edu/pub/bash/bash-4.1-rc1.tar.gz

The syslog feature (in config-top.h) appears to be enabled by default.
This is quite shocking




Bash-4.1-rc1 available for FTP

2009-12-22 Thread Chet Ramey
The first release candidate of bash-4.1 is now available with the URL

ftp://ftp.cwru.edu/pub/bash/bash-4.1-rc1.tar.gz

This tar file does not include the formatted documentation (you
should be able to generate it yourself).

This release fixes several outstanding bugs in bash-4.0 and introduces a
number of new features -- a larger number than usual for a minor version
release.

The most notable new features are a dynamic programmable completion
definition framework, a "default" programmable completion option, a
way to pass shell options to subshells, a mechansim to have redirections
allocate and assign a file descriptor to a shell variable, and a way
to direct xtrace output to an arbitrary file descriptor.

`bashbug' may be used to report bugs with this version.

As always, thanks for your help.

Chet

+== CHANGES ==+
This document details the changes between this version, bash-4.1-rc1,
and the previous version, bash-4.1-beta.

1.  Changes to Bash

a.  Fixed a bug that caused printf to not return a partial value when it
encountered an error while converting an integer argument.

b.  Fixed a bug that caused setting one of the compatNN options to not
turn off the others.

c.  The (undocumented) --wordexp option is no longer included by default.

d.  Fixed a bug in conditional command execution that caused it to not
correctly ignore the exit status under certain circumstances.

e.  Added a configure-time check for correctly-working asprintf/snprintf.

f.  Fixed some problems with line number calculation and display when sourcing
a file in an interactive shell.

g.  Fixed a bug that caused the shell to crash when using `declare -A foo=bar'.

h.  Fixed a bug that caused an off-by-one error when calculating the directories
to display with the PROMPT_DIRTRIM option.

2.  Changes to Readline

a.  Fixed a bug that caused applications using the callback interface to not
react to SIGINT (or other signals) until another character arrived.

--
This document details the changes between this version, bash-4.1-beta,
and the previous version, bash-4.1-alpha.

1.  Changes to Bash

a.  Fixed a bug in mapfile that caused the shell to crash if it was passed the
name of an associative array.

b.  Fixed a bug that caused the shell to incorrectly split case patterns if
they contained characters in $IFS.

c.  Fixed a bug that caused the shell to set $? to the wrong value when using
a construct ending with a variable assignment with set -x enabled and PS4
containing a command substitution.

d.  Fixed a bug that caused the shell to read commands incorrectly if an
expansion error occurred under certain conditions in a user-specified
subshell.

e.  Fixed a bug that caused the shell to set $? incorrectly if a parse error
occurred in an evaluation context ("eval", trap command, dot script, etc.)

f.  Fixed a bug that caused the shell to attempt command substitution
completion within a single-quoted string.

g.  Fixed a bug that caused the shell to insert an extra single quote during
word completion.

h.  Fixed a bug that caused the shell to crash if invoked with the environment
variable EMACS having a null value.

i.  Fixed a bug that caused bash to incorrectly report the presence of new
mail in a `maildir' environment.

j.  Fixed a bug that caused the shell to not recognize a here-document ending
delimiter inside a command substitution.

k.  Fixed a bug that caused the shell to crash when a a dynamic array variable
was assigned a scalar value.

2.  Changes to Readline

3.  New Features in Bash

a.  The mapfile/readarray builtin no longer stores the commands it invokes via
callbacks in the history list.

b.  There is a new `compat40' shopt option.

c.  The < and > operators to [[ do string comparisons using the current locale
only if the compatibility level is greater than 40 (set to 41 by default).

4.  New Features in Readline

--
This document details the changes between this version, bash-4.1-alpha,
and the previous version, bash-4.0-release.

1.  Changes to Bash

a.  Fixed bugs in the parser involving new parsing of the commands contained
in command substitution when the substitution is read.

b.  Fixed a bug that caused the shell to dump core when performing programmable
completion using a shell function.

c.  Fixed a bug in `mapfile' that caused it to invoke callbacks at the wrong
time.

d.  Fixed a bug that caused the shell to dump core when listing jobs in the
`exit' builtin.

e.  Fixed several bugs encountered when reading subscripts in associative
array assignments and expansions.

f.  Fixed a bug that under some circumstances caused an associative array to
be converted to an indexed array.

g.  Fixed a bug that caused syntax errors and SIGINT interrupts