[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coproc usage ... not understanding

From: Bob Proulx
Subject: Re: Coproc usage ... not understanding
Date: Wed, 10 Aug 2011 10:07:20 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Greg Wooledge wrote:
> Linda Walsh wrote:
> > Bob Proulx wrote:
> > >This may be a good point to mention this reference:
> > >
> > >  http://www.pixelbeat.org/programming/stdio_buffering/
> >     Does it only work with gnu programs?   I.e. how would they know to 
> >     not buffer
> Sounds like the GNU version of "unubuffer" from the Tcl expect package.
> http://expect.sourceforge.net/

Similar in result.  Different in implementation.

The unbuffer expect script sets up a tty around the called program so
that instead of a pipe the program detects a tty.  Programs that
normally do not buffer when writing to a tty will then work as if they
were interactive even if they were not.  Wrapping commands is a core
functionality of expect scripts and so unbuffer is using it for the

The stdbuf utility works by setting up an LD_PRELOAD library
libstdbuf.so that replaces the libc calls and intercepts and overrides
the calls to do buffering.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]