All pastes #966207 Raw Edit

Mine

public text v1 · immutable
·published 2008-04-01 16:00 UTC
rendered paste body
variable x
variable port

fileevent $portNum readable [list ::myNS::getPort $portNum]
fconfigure $portNum -buffering line
set x 0
vwait x

proc getPort {pipe} {
	variable x
	variable port
	gets $pipe port
	puts stderr $port
	fileevent $pipe readable ""
	set x 1
}