[Twisted-Python] mktap dns is broken if you switch subnets

Brian Warner warner at lothar.com
Wed Apr 30 16:32:25 EDT 2003

Jp Calderone <exarkun at intarweb.us> writes:
>   It would be great if Twisted could speak FAM.  I looked briefly at
> integrating the python wrapper, but didn't have time to go very in-depth. 

Personally, I find FAM's implementation annoying, because is uses sunrpc, and
requires the "security-compromise-waiting-to-happen" portmap daemon be
running. I wish they had implemented it with a unix socket instead, but it
appears to be aimed at handling remote (NFS) directory changes as well as
local ones. Something less server-heavy would seem more appropriate.

The Linux mechanism is DNotify, and you can get at most of the functionality
from the Python side. I have code in the BuildBot (buildbot.dnotify) which
does the necessary Twisted glue, and I'd be happy to contribute that if it
seems useable. Code is available from http://buildbot.sf.net .

One problem with that module is that DNotify uses SIGIO (or other signal of
your choice) to indicate the change, and Python's signal-delivery code
doesn't pass the siginfo_t argument to the Python handler, which means
multiple DNotify notifications for the same process all look the same.

That buildbot code also falls back to polling every 10 seconds if the DNotify
fcntl values aren't available (e.g. non-linux).


More information about the Twisted-Python mailing list