This is how we do it. POLL(1) Plan B — 3rd edition POLL(1) NAME poll - poll files for changes SYNOPSIS poll [ -1 ] [ -i ival ] cmd file... DESCRIPTION Poll monitors the given files each ival seconds (one by default) and runs cmd when any of the files change. It uses fstat(2) to generate a single stat(5) request for each poll and file. If -1 is given, the program exits after the first change noticed; otherwise, it keeps on polling the files. The command is assumed to be at /bin and is executing using the list of files as arguments. SOURCE /sys/src/cmd/poll.c Page 1 Plan B User's Manual (printed 4/19/05)