delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/11/15/14:07:33

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Subject: cygtclsh80 and file events
To: cygwin AT sources DOT redhat DOT com
From: John DOT Velman AT HSC DOT com
Date: Wed, 15 Nov 2000 11:09:30 -0800
Message-ID: <OF00B4F0DB.701FFD99-ON88256998.00679273@hughes.com>
X-MIMETrack: Serialize by Router on MTA00/HUGHES(Release 5.0.5 |September 22, 2000) at
11/15/2000 11:09:30 AM
MIME-Version: 1.0

Does cygtclsh80 handle file events "properly?"

I'm new at tcl, and may be doing something that is
basically wrong.    On the other hand.... I thought I'd
ask...

I have a small script that works on my Linux platform, but
not in cygwin, that does something like:

_____________
set my_pipe [open "|myprog  " r+]

fileevent $my_pipe readable [list Reader $my_pipe]

proc Reader {pipe} {.....

____________

I'm learning and developing, so I enter cygtclsh80
from bash, then source the script that has the above lines.


On Linux, if I send "myprog" an input through the pipe, Reader
picks up the output and does it's thing and exits.  In Cygwin,
the event loop doesn't call Reader.  When I call Reader explicitly,
the output is all there.    Unfortunately, then when the pipe is
empty Reader sits there waiting for more input ( it does a
test on fblocked, which never gets to be 1).

By the way, I've tried this in cygwin
both with and without <fconfigure $my_pipe -blocking 0>, and
the the same thing happens either way.

Thanks,
John Velman



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019