diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-09-07 14:54:13 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-09-07 14:54:13 +0000 |
commit | a261aa1386d760af32451215503b6ce594760801 (patch) | |
tree | b535088a0569be765a80209aad6cf928d668e55b | |
parent | a533f2fc67425edd445a477e61b122e9c73f27c4 (diff) | |
download | gpsd-a261aa1386d760af32451215503b6ce594760801.tar.gz |
Sanity check...
...may avoid a spurious error we occasionally see in regression testing.
-rw-r--r-- | gpsfake.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -268,6 +268,8 @@ class DaemonInstance: return False def fd_set(self): "Return the set of file descriptors currently opened by the daemon." + if self.pid == None: + return [] fds = map(int, os.listdir("/proc/%d/fd" % self.pid)) # I wish I knew what the entries above 1000 in Linux /proc/*/fd mean... return filter(lambda x: x < 1000, fds) |