Linux, fcntl, F_SETLEASE and signals

Chris Green cmg at dok.org
Mon Jul 26 10:13:01 EDT 2004


Jeff Epler <jepler at unpythonic.net> writes:

>Use Py_AddPendingCall() (undocumented? but with a public API name) to
>run a callback with the stashed information in the void* arg, which
>calls back into Python or does whatever else you need.

What I ended up doing what creating a module that just installed a
handler that appends FD info onto a queue and then have a python call
that will check that queue suitable for use in an event loop.

It's my first python C extension so there's a few things I'm sure I'm
not doing right, most notably finding the spot to put finalization
code in.

http://cmg.dok.org/cgi-bin/pyblosxom.cgi/python/linuxlease
-- 
Chris Green <cmg at dok.org>
"I'm beginning to think that my router may be confused."



More information about the Python-list mailing list