On Sun, 20 Jan 2002, Aviram Jenik wrote:

> Hi,
>
> I'm having the following programming program: I have an app (an external app
> which I cannot modify), that sends info to stdout, which I want to capture.
> If I run the app without redirection, I can see the output coming out
> immediately sent out to the screen. To emphasize:
> $ ./externalApp
> line 1
> line 2
> line 3
> ..
>
> However, if I redirect the input to a file, or pipe it into another app (my
> own), the output only starts to show after ~4 minutes. There's no text
> missing, it just appears 'late'.
>
> This is as if the external app forgot to 'flush' or something. Like I said,
> I can't modify this external app and I have to work around it.
>

Seems that it forgot to flush. I think there are tools like Perl's
Term::IO and Tcl/Tk's expect that can overcome this and be used to capture
a program's output as soon as it is written. But I'm not sure.

Regards,

        Shlomi Fish

> Any ideas?
>
> --
> Aviram Jenik
> Beyond Security Ltd.
> http://www.BeyondSecurity.com
> http://www.SecuriTeam.com
>
> Know that you're safe:
> http://www.AutomatedScanning.com
>
>
>
> =================================================================
> To unsubscribe, send mail to [EMAIL PROTECTED] with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail [EMAIL PROTECTED]
>



----------------------------------------------------------------------
Shlomi Fish        [EMAIL PROTECTED]
Home Page:         http://t2.technion.ac.il/~shlomif/
Home E-mail:       [EMAIL PROTECTED]

"Let's suppose you have a table with 2^n cups..."
"Wait a second - is n a natural number?"


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to