On Monday 31 March 2008 17:05, James Simmons wrote:
>
> > On Monday 31 March 2008 16:40, James Simmons wrote:
> > >
> > > > # { echo TEST; sleep 1; } | { ./nonblocking; cat; ./blocking; } >result
> > > > cat: read error: Resource temporarily unavailable
> > > >
> > > > and file "result" contains "TEST", as expected. -- vda
> > >
> > > For my case I have ` cat /var/log/test | more ` where the test log is a
> > > ring buffer.
> >
> > I do not understand what do you mean by "ring buffer" here.
> >
> > > Without the patch cat will read the file but then just sit
> > > there once it reaches the end.
> >
> > Really? I think cat exits when it reaches end-of-file.
>
> Yes it does. The problem is emlog never has a end-of-file.
Aha. I see. In this case, my first example:
{ ./nonblocking; cat; ./blocking; } <emlog_pipe >result
will work as you want it to: it will read entire emlog
and exit as soon as it get EAGAIN.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox