#!/usr/bin/tclsh
puts [package require inotify]

proc handler {fd} {
    puts [watch read]
}

set a 0
while {1} {
    puts Instance:[inotify create watch handler]
    exec echo 1 >> 132.txt
    puts [inotify info]
    puts [watch info]
    puts [watch queue]
    after 20 set a 1
    vwait a
    rename watch {}
}
