Part of twisted.internet.process View Source View In Hierarchy
Unknown Field: ivars | listdir | The implementation of listdir to use. This gets overwritten by the test cases. |
getpid | The implementation of getpid to use, returns the PID of the running process. | |
openfile | The implementation of open() to use, by default the Python builtin. |
Method | __init__ | Undocumented |
Method | _listOpenFDs | Return an iterable of file descriptors which may be open in this process. |
Method | _getImplementation | Pick a method which gives correct results for _listOpenFDs
in this runtime environment. |
Method | _devFDImplementation | Simple implementation for systems where /dev/fd actually works. See: http://www.freebsd.org/cgi/man.cgi?fdescfs |
Method | _procFDImplementation | Simple implementation for systems where /proc/pid/fd exists (we assume it works). |
Method | _fallbackFDImplementation | Fallback implementation where either the resource module can inform us about the upper bound of how many FDs to expect, or where we just guess a constant maximum if there is no resource module. |
This will try to return the fewest possible descriptors without missing any.
_listOpenFDs
in this runtime environment.
This involves a lot of very platform-specific checks, some of which may be relatively expensive. Therefore the returned method should be saved and re-used, rather than always calling this method to determine what it is.
See the implementation for the details of how a method is selected.
All possible file descriptors from 0 to that upper bound are returned with no attempt to exclude invalid file descriptor values.