Re: Strange behaviour on 'read' from a pipe

2012-04-01 Thread Chet Ramey
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 simple race condition. I suspect that the scheduler arranges things so that the child process ends up exiting betw

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 Chet Ramey
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 real evidence to back it up. > > Note that the opening of the pipe 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: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, > >> with > >> bash 4.0, 4.1, 4.2.. until 4.2-p20, my last

Re: Strange behaviour on 'read' from a pipe

2012-04-01 Thread Andreas Schwab
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, 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 t

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-p20, my last test. > > > > However, in irc some