Re: Strange behaviour on 'read' from a pipe

2012-04-02 Thread Lluís Batlle i Rossell
On Mon, Apr 02, 2012 at 03:29:33PM -0400, Greg Wooledge wrote: > On Mon, Apr 02, 2012 at 08:46:12PM +0200, Lluís Batlle i Rossell wrote: > > #!/bin/sh > > You're running this in sh? But reporting it as a bug in bash? In that case, sh points to bash. Sorry for the confusion

Re: Strange behaviour on 'read' from a pipe

2012-04-02 Thread Lluís Batlle i Rossell
On Mon, Apr 02, 2012 at 04:39:19PM +0200, Lluís Batlle i Rossell wrote: > Trying to reproduce the race, I got rid of 'sleep', and expected this to never > hang. But it hangs where I try. Should I submit this to LKML maybe? > > I think it should not hang ever, but maybe I

Re: Strange behaviour on 'read' from a pipe

2012-04-02 Thread Lluís Batlle i Rossell
On Sun, Apr 01, 2012 at 06:27:46PM -0400, Chet Ramey wrote: > On 4/1/12 1:02 PM, Lluís Batlle i Rossell wrote: > > On Sun, Apr 01, 2012 at 11:06:22AM -0400, Chet Ramey wrote: > >> On 4/1/12 5:53 AM, Andreas Schwab wrote: > >> > >>>> It looks like a

Re: Strange behaviour on 'read' from a pipe

2012-04-02 Thread Lluís Batlle i Rossell
On Sun, Apr 01, 2012 at 06:27:46PM -0400, Chet Ramey wrote: > On 4/1/12 1:02 PM, Lluís Batlle i Rossell wrote: > > On Sun, Apr 01, 2012 at 11:06:22AM -0400, Chet Ramey wrote: > >> On 4/1/12 5:53 AM, Andreas Schwab wrote: > >> > >>>> It looks like a

Re: Strange behaviour on 'read' from a pipe

2012-04-01 Thread Lluís Batlle i Rossell
On Sun, Apr 01, 2012 at 11:06:22AM -0400, Chet Ramey wrote: > On 4/1/12 5:53 AM, Andreas Schwab wrote: > > >> It looks like a simple race condition. I suspect that the scheduler > >> arranges things so that the child process ends up exiting between the > >> open and the read, but I don't have any

Re: Strange behaviour on 'read' from a pipe

2012-04-01 Thread Lluís Batlle i Rossell
On Sun, Apr 01, 2012 at 11:53:12AM +0200, Andreas Schwab wrote: > Chet Ramey writes: > > > On 3/31/12 9:19 AM, Lluís Batlle i Rossell wrote: > >> Hello, > >> > >> I have this script, that I've found to never write "DONE" in my systems, >

Re: Strange behaviour on 'read' from a pipe

2012-04-01 Thread Lluís Batlle i Rossell
On Sat, Mar 31, 2012 at 09:16:20PM -0400, Chet Ramey wrote: > On 3/31/12 9:19 AM, Lluís Batlle i Rossell wrote: > > Hello, > > > > I have this script, that I've found to never write "DONE" in my systems, > > with > > bash 4.0, 4.1, 4.2.. until 4.2-

Strange behaviour on 'read' from a pipe

2012-03-31 Thread Lluís Batlle i Rossell
Hello, I have this script, that I've found to never write "DONE" in my systems, with bash 4.0, 4.1, 4.2.. until 4.2-p20, my last test. However, in irc some people told me it prints DONE for them. If I run the script with bash under 'strace -f', it also prints DONE. So there is some kind of race

Re: Trouble with PS1 special characters between \[ and \]

2010-11-09 Thread Lluís Batlle i Rossell
On Sun, Oct 31, 2010 at 09:24:24PM +0800, Clark J. Wang wrote: > 2010/10/31 Lluís Batlle i Rossell > > > Hello, > > > > I don't think this problem is related to any recent bash version only. I've > > seen > > this since years I think. > > &

Trouble with PS1 special characters between \[ and \]

2010-10-30 Thread Lluís Batlle i Rossell
Hello, I don't think this problem is related to any recent bash version only. I've seen this since years I think. Nevertheless I'm using GNU bash, version 4.0.17(1)-release (x86_64-unknown-linux-gnu) now. My PS1 uses the "Change window title" sequence, to set the xterm window title to something

Re: --rcfile still opening the SYS_BASHRC

2009-05-15 Thread Lluís Batlle
2009/5/15 Chet Ramey : > Lluís Batlle wrote: >> Hello, >> >> I have a problem in bash (3.2 and 4). I have it compiled with >> "-DSYS_BASHRC=/etc/bashrc", and since some time ago I could use "bash >> --rcfile ~/.myrc" to skip the parsing of /

--rcfile still opening the SYS_BASHRC

2009-05-14 Thread Lluís Batlle
Hello, I have a problem in bash (3.2 and 4). I have it compiled with "-DSYS_BASHRC=/etc/bashrc", and since some time ago I could use "bash --rcfile ~/.myrc" to skip the parsing of /etc/bashrc. I can't recall what was the compile configuration of that bash where this worked. But in the latest bash