Ticket #972 (assigned enhancement )

Opened 4 years ago

Last modified 3 years ago

Add linux inotify support to twisted core

Reported by: exarkun Assigned to: hagbard (accepted)
Type: enhancement Priority: normal
Milestone: Component: core
Keywords: Cc: exarkun, spiv, hagbard
Branch: Author:
Launchpad Bug:

Attachments

Change History

  2005-04-11 06:24:06+00:00 changed by exarkun

Initial code is checked in at sandbox/inotify.py

  2005-04-11 07:28:57+00:00 changed by hagbard

here's the fix to make it work with python < 2.3
Index: inotify.py
===================================================================
--- inotify.py	(revision 13515)
+++ inotify.py	(working copy)
@@ -130,7 +130,7 @@
         request = array.array('c', struct.pack(structWatchRequest,
            pathBuffer.buffer_info()[0], mask))
-        handle = fcntl.ioctl(self.fd, INOTIFY_WATCH, request, 1)
+        handle = fcntl.ioctl(self.fd, INOTIFY_WATCH, request.buffer_info()[0])
         port = iNotifyPort(path, handle, iNotifyFactory, self)
@@ -142,7 +142,7 @@
             return
         del self.ports[handle]
         request = array.array('c', struct.pack(structWatchIgnore, handle))
-        return fcntl.ioctl(self.fd, INOTIFY_IGNORE, request, 1)
+        return fcntl.ioctl(self.fd, INOTIFY_IGNORE, request.buffer_info()[0])
     def connectionLost(self, reason):
         for handle in self.ports.keys():

  2006-03-07 01:30:49+00:00 changed by spiv

  • component set to conch
  • summary changed from Linux inotify support in twisted core to Add linux inotify support to twisted core

  2006-03-07 02:23:52+00:00 changed by exarkun

  • component changed from conch to core
Note: See TracTickets for help on using tickets.