Posted to tcl by none at Thu Jan 28 09:25:12 GMT 2010view raw
- proc readdata {filechannel} {puts [gets $filechannel]}
- catch {[exec /bin/mknod file_a p]} hgfcdwehb
- set filechannel [open file_a {RDONLY}]
- fconfigure $filechannel -blocking 0 -buffering line
- fileevent $filechannel readable [readdata $filechannel]
- vwait forever
- #another process will be writing lines to the file: open, puts, flush, close