RickM is quite correct when he said use fileevent.

I have a little monitor program that displays ping
output in read and green...  stuff like that.

anyway here is some code that run concurently

  set          DB(Fpipe)      [open "|/bin/sh" r+ ]
    fileevent   $DB(Fpipe) readable {
        if { [ eof $DB(Fpipe) ] } {
                        close $DB(Fpipe)
        } else {        ping:shell_output [gets $DB(Fpipe) ]
        }
    }


The function ping:shell_output gets each line of output
from the /bin/sh command.  At any time you can run programs
simply by feeding them to the shell.  like this:

puts  $DB(Fpipe) "/usr/bin/perl /u/lib/tk/fping.pl $al"
_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/vtcl-user

Reply via email to