[TriLUG] semi OT: TCL buffer/flush help

Marty Ferguson marty at rtmx.net
Thu Apr 22 01:28:20 EDT 2004


Did you experiment with creating a named pipe (man mkfifo) for $OUT?  
If not, I would suggest the mystical incantation of arcane UNIX magic.
It's certainly worth a try. 

Marty

-----Original Message-----
From: trilug-bounces at trilug.org [mailto:trilug-bounces at trilug.org]On
Behalf Of Douglas Kojetin
Sent: Wednesday, April 21, 2004 8:38 PM
To: Triangle Linux Users Group discussion list
Subject: [TriLUG] semi OT: TCL buffer/flush help


hi all.

if there are any TCL gurus on the list, i need some assistance.  i'm 
using a TCL script that uses the 'flush' call to open and send commands 
to an external (non TCL) program.  here is a sample of my lines:

          set OUT [open "|the_program " w+]
          puts $OUT "command_1 "
          puts $OUT "command_2 "
          puts $OUT "command_3 "
          puts $OUT "command_4 "
          puts $OUT "command_5 "
          flush $OUT

it works OK, but i'm apparently experiencing a buffer overload, and the 
program stalls/freezes after some use.  it's somewhat described on this 
page:  http://wiki.tcl.tk/919

anyone know how i might be able to adjust my output (the above) so that 
i do not experience buffer overload (and, subsequently, a program 
stall)?

thanks,
doug

-- 
TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ  : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc




More information about the TriLUG mailing list