[TriLUG] semi OT: TCL buffer/flush help

john mitchell john280z at earthlink.net
Thu Apr 22 14:23:28 EDT 2004


Well, I got to learn something new today. Thanks for the point to named 
pipes and the lo an behold, this article turns up:

http://searchenterpriselinux.techtarget.com/tip/1,289483,sid39_gci955458,00.html

john mitchell

Marty Ferguson wrote:
> 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
> 



More information about the TriLUG mailing list