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 | _listOpenFDs | Figure out which implementation to use, then run it. |
Method | _getImplementation | Check if /dev/fd works, if so, use that. Otherwise, check if /proc/%d/fd exists, if so use that. |
Method | _checkDevFDSanity | Returns true iff opening a file modifies the fds visible in /dev/fd, as it should on a sane platform. |
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 | _resourceFDImplementation | Fallback implementation where the resource module can inform us about how many FDs we can expect. |
Method | _fallbackFDImplementation | Fallback-fallback implementation where we just assume that we need to close 256 FDs. |
Check if /dev/fd works, if so, use that. Otherwise, check if /proc/%d/fd exists, if so use that.
Otherwise, ask resource.getrlimit, if that throws an exception, then fallback to _fallbackFDImplementation.Fallback implementation where the resource module can inform us about how many FDs we can expect.
Note that on OS-X we expect to be using the /dev/fd implementation.