[PATCH] Fix process substitution with named pipes.

2013-10-31 Thread Michael Haubenwallner
When /dev/fd is missing, and named pipes are used instead (like on AIX), this snippet sometimes does work right, wrong, or hang - depending on the operating system's process scheduler timing: for x in {0..9}; do echo $x; done > >( cnt=0; while read line; do let cnt=cnt+1; done; echo $cnt )

about read command in rc.local

2013-10-31 Thread raymond lee
Hi, I used read command in /etc/rc.local, and system was redirected to ttyS0, but when exec read in rc.local, my input did not echo in ttyS0, and system actualy got my input. I am confused about this.

Re: [PATCH] Fix process substitution with named pipes.

2013-10-31 Thread Chet Ramey
On 10/31/13, 11:46 AM, Michael Haubenwallner wrote: > When /dev/fd is missing, and named pipes are used instead (like on AIX), > this snippet sometimes does work right, wrong, or hang - depending on > the operating system's process scheduler timing: > > for x in {0..9}; do echo $x; done > >( >

declare -g var should return a nonzero return code when it fails

2013-10-31 Thread Peggy Russell
Hi, "declare -g var" should return a nonzero return code when it fails. Declaring a local variable as global in a function, has a exit status of 0, but the operation was not successful (see test_error). "help declare" and the bash man page indicate the exit status will indicate success or failu