[pypy-dev] Needs some guidance in writing the kqueue part of select

Paolo Giarrusso p.giarrusso at gmail.com
Sun Nov 21 10:26:04 CET 2010

On Sun, Nov 21, 2010 at 00:54, Leonardo Santagada <santagada at gmail.com> wrote:
> here is the latest version of the code http://paste.pocoo.org/show/294079/
> Things apear to be working except that when I run the tests
> http://paste.pocoo.org/show/294087/ the kevent one fails. Supposedly
> it should give me back the event setting kevent.data to how much you
> can read on the file and it is returning 0 to me.
> Maybe I did something dumb while declaring kevent_array or in
> kevent_struct, but I'm kind of lost. Python 3.1 show the expected
> behavior (of course, using its much more high level interface).

> Any tips?

Have you tried using strace on the two programs, to see and compare
the actual invocations?
Variations of strace -e kqueue,kevent,file,network might help
selecting relevant data (-e syscall1,syscall2,...,syscallN shows only
those syscalls; file and network are syscall categories).

If you are not on Linux but on other *BSDes (and it seems you must be,
since Linux has other syscalls), you might still use strace or

Best regards
Paolo Giarrusso - Ph.D. Student

More information about the Pypy-dev mailing list