[SVN] r9345

Luke Daley ld at ldaley.com
Wed Apr 9 11:05:44 UTC 2008


• Implemented tracking of which file descriptors are STDIN.

To achieve this we overload dup() and close(). In those implementations we pass the file descriptors in question to the methods stdin_fd_tracker_did_dup() and stdin_fd_tracker_did_close(). The methods in stdin_fd_tracker.c use a global integer set (intset.c) to maintain the list of STDIN file descriptors.

When a read is requested, we now see if they file descriptor the read is for is really STDIN by calling stdin_fd_tracker_is_stdin().

This change makes the test committed as revision 9344 pass. 

Changed:
A   trunk/Tools/tm_interactive_input/src/close.c
A   trunk/Tools/tm_interactive_input/src/close.h
A   trunk/Tools/tm_interactive_input/src/dup.c
A   trunk/Tools/tm_interactive_input/src/dup.h
A   trunk/Tools/tm_interactive_input/src/intset.c
A   trunk/Tools/tm_interactive_input/src/intset.h
U   trunk/Tools/tm_interactive_input/src/read.c
A   trunk/Tools/tm_interactive_input/src/stdin_fd_tracker.c
A   trunk/Tools/tm_interactive_input/src/stdin_fd_tracker.h



More information about the textmate-dev mailing list