pipe channel getting blocked on windows

From: yahalom (yahalome_at_XOR-T.COM)
Date: 05/31/04


Date: 30 May 2004 20:53:52 -0700

I have a program that opens a pipe to a channel on linux and on
windows. when the channel does not return after a while I have set a
timeout on it.
when I try to close the channel it waits until the channel exists.
I set the channel to non-blocking mode and it works fine on linux. on
windows it still hangs.
how can I force the channel to exit?

set timeoutFlag 0
set ofd [open "|d:/blockingProgram" r+]
puts $ofd "please don't block..."
catch {flush $ofd}
fileevent $ofd readable [list set timeoutFlag 2]
set afterId [after 2000 [list set timeoutFlag 1]]
vwait timeoutFlag
if {$timeoutFlag==1} {
        puts "reached timeout"
fconfigure $ofd -blocking 0
catch {close $ofd}
} else {
 #do something
}



Relevant Pages

  • blocking on windows
    ... I have a program that opens a pipe to a channel on linux and on ... windows it still hangs. ... puts $ofd "please don't block..." ... fileevent $ofd readable [list set timeoutFlag 2] ...
    (comp.lang.tcl)
  • closing blocked channel on windows
    ... when I try to close the channel it waits until the channel exists. ... windows it still hangs. ... puts $ofd "please don't block..." ... fileevent $ofd readable [list set timeoutFlag 2] ...
    (comp.lang.tcl)
  • Re: Vista media center, ATSC HDTV, and 853x480
    ... WMP lists the video size as 853x480. ... Interestingly, on the Vista computer, from Windows Explorer I was able to ... It appears that you are either using your analog tuner(channel number not ... Windows XP computer has a 24" LCD via DVI connector. ...
    (microsoft.public.windows.mediacenter)
  • Re: How do I create a simple table? DataGrid seems very complicated
    ... reflect the information for the currently selected channel. ... If by "windows file manager" you mean Windows Explorer, ... seemed more simple than a "bound" DataGrid for what I needed. ... handles interacting with this piece of hardware I'm using. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Why TV on demand insists you use its chosen browser
    ... The UK ITV tie-in to Internet Explorer really pissed me off, ... Channel 4's new download service is restricted to those using Windows XP ...
    (alt.os.linux)