site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dear darwin-dev list, For your reference, my code looks somewhat like this: int kq = kqueue(); err = kevent(kq, &ev, 1, NULL, 0, &nullts); } EV_SET(&ev, SIGIO, EVFILT_SIGNAL, EV_ADD | EV_ENABLE, 0, 0, 0); err = kevent(kq, &ev, 1, NULL, 0, &nullts); and then I poll using n = kevent(kq, NULL, 0, &ev, 1, NULL); Thanks, maurits -- http://www.plasticsfuture.org _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... is there a limit on the number of files one can simultaneously monitor with the kevent mechanism? Basically, I want to monitor if a file has changed, for potentially hundreds or even thousands of files. The code I have (based on Michael McCracken's stakeout) seems to be able to monitor no more than 251 files (weird number, I don't have a clue why). Is there a limitation? Is it even sensible to monitor so many files simultaneously using the kevent mechanism? for (every file...) { EV_SET(ev, fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR, NOTE_RENAME | NOTE_WRITE | NOTE_DELETE | NOTE_EXTEND, 0, (void *) path); This email sent to site_archiver@lists.apple.com