From 4dd7c62a513ffafa080419f9848c601921b45da5 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Tue, 28 Sep 2010 08:09:39 +1000 Subject: Implement 'pid handle' Signed-off-by: Steve Bennett --- examples/popen.tcl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/popen.tcl b/examples/popen.tcl index 8a6b6e3..f330fc9 100644 --- a/examples/popen.tcl +++ b/examples/popen.tcl @@ -4,14 +4,15 @@ # Write to a pipe set f [open |[list cat | sed -e "s/line/This is line/" >temp.out] w] +puts "Creating temp.out with pids: [pid $f]" foreach n {1 2 3 4 5} { puts $f "line $n" } close $f -puts "Created temp.out" # Read from a pipe set f [open "|cat temp.out"] +puts "Reading temp.out with pids: [pid $f]" while {[gets $f buf] >= 0} { puts $buf } -- cgit v1.1