repo.or.cz
/
jimtcl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
It was possible to create a bad ref
[jimtcl.git]
/
examples
/
pipe.tcl
blob
6b10dbdd95354126f81667e83a9b9864069b2886
1
lassign
[
socket
pipe
]
r w
2
3
# Note, once the exec has the fh (via dup), close it
4
# so that the pipe data is accessible
5
exec
ps aux
>@
$w
&
6
$w
close
7
8
$r
readable
{
9
puts
[
$r
gets
]
10
if
{[
eof
$r
]} {
11
$r
close
12
set
done
1
13
}
14
}
15
16
vwait
done