The subject says it all - normally easy and cross platform way is to poll, intelligently. But every OS has some means to notify without polling. Is it possible in a reasonab
libevent or libev seem to be what you want, though I haven't used them.