On Sun, 08 Sep 2002 16:22:55 +1000
Lucas King <[EMAIL PROTECTED]> wrote:

> hello,
> 
> the following is an excerpt from Exploring Expect by Don Libes:
> 
> "Programs using the standard I/O library provided by UNIX automatically 
> buffer their output when running non-interactively.  This causes 
> problems when you need to see the output immediately."  ... it is 
> possible "to make the programs think they are running interactively, 
> thereby resolving the buffering problem."
> 
> Don does not go on to say how one makes a program think that it is 
> "talking" to an interactive interface.
> 
> does anyone know how to do this?  in C preferrably.

The only way I know of doing this is my setting the programm up to talk
to your own program via a pty (psuedo terminal). There is an example
of this in the late Richard Steven's book "Advanced Programming in a Unix 
Environment".

This book is probably the best unix programming book available and I
highly recommend it. His pair of network programming books are also
excellent.

Cheers,
Erik
-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  [EMAIL PROTECTED] (Yes it's valid)
+-----------------------------------------------------------+
J. Headley: "God, root, what is difference ?"
G. Haverland: "God can change the byte order on the CPU, root can't."
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to