[SVN] r9605

Luke Daley ld at ldaley.com
Sun May 18 05:40:33 UTC 2008


• Make select() implementation more sophisticated.

The naive implementation was causing problems. What we do now is…

1. Make a copy of the fd set passed in reading.
2. Call the system select() implementation.
3. Compare the read fd set after the system call with the set of fds we are tracking for interactive input
    - If we are tracking an fd that is NOT in what the system select() returned, we add it and essentially increment the return value.

This seems to be exactly the kind of logic at least that we should be using. Tests show that this fixes the problems with the naive implementation at least.

Changed:
U   trunk/Support/lib/tm_interactive_input.dylib
U   trunk/Tools/tm_interactive_input/src/stdin_fd_tracker.c
U   trunk/Tools/tm_interactive_input/src/stdin_fd_tracker.h
U   trunk/Tools/tm_interactive_input/src/system_function_overrides.c



More information about the textmate-dev mailing list