This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

cygtclsh80 and file events


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@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]