Bellboy is a project mainly written in C, it's free.
Watching readable file discriptor
Mapped function is called when a file descriptor associated is readable (using select(2)).
Example: Watching STDIN, see test/bellboy_test.c