Re: Another call of async-signal-unsafe function

2011-11-07 Thread Chet Ramey
On 11/7/11 9:05 AM, Roman Rakus wrote: > There's a small chance to call unsafe function (malloc) during signal > handling. It occurs during bash 4.2 startup, when user resize window. > Occurs on bash configured to use system malloc (not bash malloc). Thanks for the report. This will be fixed in t

Re: bash: while: command not found? ??

2011-11-07 Thread Chet Ramey
On 11/7/11 3:40 PM, Linda Walsh wrote: > So I try putting do on a separate line: > ># bash: while: command not found. > > hmm...I thought 'while was a builtin? why can't bash find it? Since redirections can't precede a compound command like while, the `while' token isn't in a position

Re: bash: while: command not found? ??

2011-11-07 Thread Greg Wooledge
On Mon, Nov 07, 2011 at 12:40:43PM -0800, Linda Walsh wrote: > #

bash: while: command not found? ??

2011-11-07 Thread Linda Walsh
At the # prompt, if I type: #

Re: Random crashes when setting locale data

2011-11-07 Thread Yuri D'Elia
On Wed, 2 Nov 2011 20:37:35 +0100 Yuri D'Elia wrote: > Core was generated by `/home/ydelia/debug/bin/bash > /home/ydelia/debug/bin/gunzip /home/ydelia/debug/file'. > Program terminated with signal 11, Segmentation fault. > #0 __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:31 > 31

Re: What is the best to pass an array with specially characters as command line arguments?

2011-11-07 Thread Peng Yu
On Mon, Nov 7, 2011 at 8:29 AM, Dennis Williamson wrote: > On Mon, Nov 7, 2011 at 7:23 AM, Peng Yu wrote: >> Hi Clark, >> >>> What do you mean by "1 long argument"? >>> >>> [bash-4.2.10] # cat foo.sh >>> v="  a b c ( a'b | " >>> set -o noglob >>> a=( $v ) >>> set +o noglob >>> for i in "${a[@]}";

Re: What is the best to pass an array with specially characters as command line arguments?

2011-11-07 Thread Dennis Williamson
On Mon, Nov 7, 2011 at 7:23 AM, Peng Yu wrote: > Hi Clark, > >> What do you mean by "1 long argument"? >> >> [bash-4.2.10] # cat foo.sh >> v="  a b c ( a'b | " >> set -o noglob >> a=( $v ) >> set +o noglob >> for i in "${a[@]}"; do >>     echo "$i" >> done >> [bash-4.2.10] # bash foo.sh >> a >> b

Another call of async-signal-unsafe function

2011-11-07 Thread Roman Rakus
There's a small chance to call unsafe function (malloc) during signal handling. It occurs during bash 4.2 startup, when user resize window. Occurs on bash configured to use system malloc (not bash malloc). The stack trace: #0 __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64

Re: What is the best to pass an array with specially characters as command line arguments?

2011-11-07 Thread Greg Wooledge
On Mon, Nov 07, 2011 at 08:50:25AM +, Stephane CHAZELAS wrote: > cmd='(set -f; IFS=" "; echo $verbatim_string)' > eval "$cmd" http://mywiki.wooledge.org/BashFAQ/050 -- I'm trying to put a command in a variable, but the complex cases always fail!

Re: What is the best to pass an array with specially characters as command line arguments?

2011-11-07 Thread Peng Yu
Hi Clark, > What do you mean by "1 long argument"? > > [bash-4.2.10] # cat foo.sh > v="  a b c ( a'b | " > set -o noglob > a=( $v ) > set +o noglob > for i in "${a[@]}"; do >     echo "$i" > done > [bash-4.2.10] # bash foo.sh > a > b > c > ( > a'b > | > [bash-4.2.10] # I misunderstood the usage

Re: What is the best to pass an array with specially characters as command line arguments?

2011-11-07 Thread Stephane CHAZELAS
2011-11-6, 21:02(-06), Peng Yu: [...] > #!/usr/bin/env bash > > verbatim_string=" a b c ( a'b | " > > args="`echo \"$verbatim_string\" | sed -f quoteverb.sed`" > > cmd="echo $args" > eval "$cmd" > > ~$ ./main.sh > a b c ( a'b | Either: #! /bin/sh verbatim_string=" a b c ( a'b | " cmd='(set -f;